Net_SmartIRC_base (Constructor) [line 340]
void Net_SmartIRC_base(
)
|
|
Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
connect [line 828]
void connect(
string
$address, integer
$port)
|
|
Creates the sockets and connects to the IRC server on the given port.
Parameters:
disconnect [line 896]
boolean disconnect(
[boolean
$quickdisconnect = false])
|
|
Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
Disconnects from the IRC server in the given quickness mode. $quickdisconnect: true, just close the socket false, send QUIT and wait $_disconnectime before closing the socket
Parameters:
getMotd [line 804]
getUsermode [line 815]
isBanned [line 1108]
boolean isBanned(
string
$channel, string
$hostmask)
|
|
Checks if the hostmask is on the specified channel banned and returns the result.
ChannelSyncing is required for this.
Parameters:
isError [line 2196]
void isError(
mixed
$object)
|
|
isJoined [line 1020]
boolean isJoined(
string
$channel, [string
$nickname = null])
|
|
checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
Parameters:
isOpped [line 1048]
boolean isOpped(
string
$channel, [string
$nickname = null])
|
|
Checks if we or the given user is opped on the specified channel and returns the result.
ChannelSyncing is required for this.
Parameters:
isVoiced [line 1078]
boolean isVoiced(
string
$channel, [string
$nickname = null])
|
|
Checks if we or the given user is voiced on the specified channel and returns the result.
ChannelSyncing is required for this.
Parameters:
listen [line 1135]
goes into receive mode
Goes into receive and idle mode. Only call this if you want to "spawn" the bot. No further lines of PHP code will be processed after this call, only the bot methods!
listenFor [line 1156]
array listenFor(
integer
$messagetype)
|
|
waits for a special message type and puts the answer in $result
Creates a special actionhandler for that given TYPE and returns the answer. This will only receive the requested type, immediately quit and disconnect from the IRC server. Made for showing IRC statistics on your homepage, or other IRC related information.
Parameters:
log [line 741]
void log(
integer
$level, string
$entry, [mixed
$file = null], [mixed
$line = null])
|
|
Adds an entry to the log.
Adds an entry to the log with Linux style log format. Possible $level constants (can also be combined with "|"s) SMARTIRC_DEBUG_NONE SMARTIRC_DEBUG_NOTICE SMARTIRC_DEBUG_CONNECTION SMARTIRC_DEBUG_SOCKET SMARTIRC_DEBUG_IRCMESSAGES SMARTIRC_DEBUG_MESSAGETYPES SMARTIRC_DEBUG_ACTIONHANDLER SMARTIRC_DEBUG_TIMEHANDLER SMARTIRC_DEBUG_MESSAGEHANDLER SMARTIRC_DEBUG_CHANNELSYNCING SMARTIRC_DEBUG_MODULES SMARTIRC_DEBUG_USERSYNCING SMARTIRC_DEBUG_ALL
Parameters:
login [line 981]
void login(
string
$nick, string
$realname, [integer
$usermode = 0], [string
$username = null], [string
$password = null])
|
|
login and register nickname on the IRC network
Registers the nickname and user information on the IRC network.
Parameters:
objListenFor [line 1182]
array objListenFor(
integer
$messagetype)
|
|
waits for a special message type and puts the answer in $result
Creates a special actionhandler for that given TYPE and returns the answer. This will only receive the requested type, immediately quit and disconnect from the IRC server. Made for showing IRC statistics on your homepage, or other IRC related information. This special version of listenFor() stores the whole ircdata object, not just the message!
Parameters:
reconnect [line 940]
Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler [line 1210]
integer registerActionhandler(
integer
$handlertype, string
$regexhandler, object
&$object, string
$methodname)
|
|
registers a new actionhandler and returns the assigned id
Registers an actionhandler in Net_SmartIRC for calling it later. The actionhandler id is needed for unregistering the actionhandler.
Parameters:
registerTimehandler [line 1318]
integer registerTimehandler(
integer
$interval, object
&$object, string
$methodname)
|
|
registers a timehandler and returns the assigned id
Registers a timehandler in Net_SmartIRC, which will be called in the specified interval. The timehandler id is needed for unregistering the timehandler.
Parameters:
setAutoReconnect [line 614]
void setAutoReconnect(
boolean
$boolean)
|
|
Enables/disables autoreconnecting.
Parameters:
setAutoRetry [line 630]
void setAutoRetry(
boolean
$boolean)
|
|
Enables/disables autoretry for connecting to a server.
Parameters:
setBenchmark [line 445]
void setBenchmark(
boolean
$boolean)
|
|
Enables/disables the benchmark engine.
Parameters:
setChannelSynching [line 462]
void setChannelSynching(
boolean
$boolean)
|
|
Deprecated, use setChannelSyncing() instead!
Parameters:
setChannelSyncing [line 478]
void setChannelSyncing(
boolean
$boolean)
|
|
Enables/disables channel syncing.
Channel syncing means, all users on all channel we are joined are tracked in the channel array. This makes it very handy for botcoding.
Parameters:
setCtcpVersion [line 500]
void setCtcpVersion(
string
$versionstring)
|
|
Sets the CTCP version reply string.
Parameters:
setDebug [line 433]
void setDebug(
integer
$level)
|
|
Sets the level of debug messages.
Sets the debug level (bitwise), useful for testing/developing your code. Here the list of all possible debug levels: SMARTIRC_DEBUG_NONE SMARTIRC_DEBUG_NOTICE SMARTIRC_DEBUG_CONNECTION SMARTIRC_DEBUG_SOCKET SMARTIRC_DEBUG_IRCMESSAGES SMARTIRC_DEBUG_MESSAGETYPES SMARTIRC_DEBUG_ACTIONHANDLER SMARTIRC_DEBUG_TIMEHANDLER SMARTIRC_DEBUG_MESSAGEHANDLER SMARTIRC_DEBUG_CHANNELSYNCING SMARTIRC_DEBUG_MODULES SMARTIRC_DEBUG_USERSYNCING SMARTIRC_DEBUG_ALL
Default: SMARTIRC_DEBUG_NOTICE
Parameters:
setDisconnecttime [line 558]
void setDisconnecttime(
integer
$milliseconds)
|
|
Sets the delaytime before closing the socket when disconnect.
Parameters:
setLogdestination [line 520]
void setLogdestination(
integer
$type)
|
|
Sets the destination of all log messages.
Sets the destination of log messages. $type can be: SMARTIRC_FILE for saving the log into a file SMARTIRC_STDOUT for echoing the log to stdout SMARTIRC_SYSLOG for sending the log to the syslog Default: SMARTIRC_STDOUT
Parameters:
setLogfile [line 546]
void setLogfile(
string
$file)
|
|
Sets the file for the log if the destination is set to file.
Sets the logfile, if logdestination is set to SMARTIRC_FILE. This should be only used with full path!
Parameters:
setReceivedelay [line 578]
void setReceivedelay(
integer
$milliseconds)
|
|
Sets the delay for receiving data from the IRC server.
Sets the delaytime between messages that are received, this reduces your CPU load. Don't set this too low (min 100ms). Default: 100
Parameters:
setReceiveTimeout [line 649]
void setReceiveTimeout(
integer
$seconds)
|
|
Sets the receive timeout.
If the timeout occurs, the connection will be reinitialized Default: 300 seconds
Parameters:
setSenddelay [line 598]
void setSenddelay(
integer
$milliseconds)
|
|
Sets the delay for sending data to the IRC server.
Sets the delaytime between messages that are sent, because IRC servers doesn't like floods. This will avoid sending your messages too fast to the IRC server. Default: 250
Parameters:
setTransmitTimeout [line 668]
void setTransmitTimeout(
integer
$seconds)
|
|
Sets the transmit timeout.
If the timeout occurs, the connection will be reinitialized Default: 300 seconds
Parameters:
setUseSockets [line 378]
void setUseSockets(
bool
$boolean)
|
|
Enables/disables the usage of real sockets.
Enables/disables the usage of real sockets instead of fsocks (works only if your PHP build has loaded the PHP socket extension) Default: false
Parameters:
showBenchmark [line 711]
Shows the benchmark result.
startBenchmark [line 683]
Starts the benchmark (sets the counters).
stopBenchmark [line 695]
Stops the benchmark and displays the result.
throwError [line 2200]
void &throwError(
mixed
$message)
|
|
unregisterActionhandler [line 1242]
boolean unregisterActionhandler(
integer
$handlertype, string
$regexhandler, object
&$object, string
$methodname)
|
|
unregisters an existing actionhandler
Parameters:
unregisterActionid [line 1283]
boolean unregisterActionid(
integer
$id)
|
|
unregisters an existing actionhandler via the id
Parameters:
unregisterTimeid [line 1347]
boolean unregisterTimeid(
integer
$id)
|
|
unregisters an existing timehandler via the id
Parameters: