package.xml0000644000175000017500000011414312514342262012626 0ustar ubuntuubuntu Net_SmartIRC pear.php.net Helps you communicate with IRC networks in whatever way you might need, whether in a CLI program or as part of a web page. Also well-suited for bot development. SmartIRC is your go-to library for interfacing with IRC networks. All you need is PHP 5.3 or later. Full feature list: ------------------------------------- - Fully object-oriented programmed - Your bot class can be inline in the same file you call SmartIRC from, or included as an external file - Every received IRC message is parsed into an object you can easily get information from (containing the following info: rawmessage, from, nick, ident, host, type, params, message, channel) - Make your bots using Action Handlers and Time Handlers, which register custom callbacks when various events happen or on time intervals, respectively т€“ or, extend the Net_SmartIRC class to add (or override) handlers directly using individual server message types - Flood protection which uses a send buffer with a queue that has 3 priority levels (high, medium, low) plus a bypass level (critical) - Nick collision detection and handling - Auto-retry during initial connection attempt - Auto-reconnect if connection is lost, which will re-join to the channels it was in before - Debugging/logging system with log levels (destination can be file, stdout, syslog or browserout) - Supports PHP as old as 5.3.0 - Channel syncing (tracking of users/modes/topic etc in objects) - Customizable CTCP VERSION reply Mirco Bauer meebey meebey@php.net no Garrett Whitehorn garrettw garrettw87@gmail.com yes Amir Mohammad Saied amir amirsaied@gmail.com no CHAILLAN Nicolas nicos nicos@php.net no 2015-04-18 1.1.7 1.1.4 stable stable LGPL * Added fluency (some methods now return $this) [garrettw] * Unknown message codes can now be handled instead of failing [garrettw] * Improved setRunAsDaemon() [garrettw] * Fix strict warning on stream_select [markcarver] * Tweaked package structure * Updated HTML documentation [garrettw] 5.3.0 1.7.0 0.2.5 0.2.5 beta beta 2002-09-02 LGPL v0.2.5 ------ - improved socket handling - bufferedsend fix - new version number system - cpu usage reduced - added changelog file 0.2.6 0.2.6 beta beta 2002-10-12 LGPL v0.2.6 ------ * phpSmartIRCclass.inc.php: - phpSmartIRCclass.inc renamed to phpSmartIRCclass.inc.php because of security reasons - changed function_exists() to get_loaded_extensions() for checking if the PHP build has real socket support - log() changed to create Linux style formated logs - new methods for logging (daemon style) log() for add log entries setlogdestination() can be STDOUT or FILE setlogfile() sets the file - changed received data processing in rawreceive() * HOWTO: - added a mini howto for using the class * DOCUMENTATION: - added class documentation of the project * CREDITS: - added credits file 0.3.0 0.3.0 beta beta 2002-10-23 LGPL v0.3.0 ----- * phpSmartIRCclass.inc.php: - added "Ping? Pong!" log message for debugging - added real linux/windows syslog logging to setlogdestination(). - new method listen_for() makes it possible to show irc related information on a homepage, like how many users on a channel are. * HOWTO: - added how to run/call the selfwritten bot * DOCUMENTATION: - added (missing) explaination for new methods * example2.php: - new examplefile with the new listen_for() method 0.3.2 0.3.2 stable stable 2002-11-05 LGPL v0.3.2 ------ * phpSmartIRCclass.inc.php: - Replaced all quotes by single quote where possible for speedup. - Added _disconnecttime for doing a clean IRC quit. - Added Zend IDE style documentation for parameter variables types and method descriptions. - Spaces in nickname and username will be automaticly removed. - Nicknamecollisions are automaticly detected and nickname will be changed to nickname with 3 random numbers. - New method nicknameuse(). - Fixed a serious fsock bug. - Added new type TYPE_ERROR. - Fixed wrong usage of & when calling methods with params that are called by reference. - Fixed a debug message "DEBUG: disconnected", now it will only occur when debug mode is enabled. - listen_for() will now do a quickdisconnect, for a big speedup. - Changed logging system, now with debug levels, default is DEBUG_NOTICE. - Added benchmark system, now its possible to time things for doing optimizations. - New methods: benchmark(), benchmarktstart(), benchmarkend() and show_benchmark() for the benchmark system - Added microint(), for getting the microtime as float, needed for the benchmarks. - Added a couple of log() calls, for different debug levels. - fsockets now runs in non blocking mode, because of broken? getstatus for fsockets. - Added mode() method, for chaning modes of a user or channel. - Added op() and deop() method. Added ban() and unban() method (thx for diff file to Peter Petermann). * DOCUMENTATION: - added documentation for new logging system - added the whole DEBUG_* list * HOWTO: - changed parameter description for debug() * example.php: - replaced all quotes by singlequotes where possible. - fixed wrong usage of message() * example2.php: - replaced all quotes by singlquotes where possible. - added benchmark test to the example 0.4.0 0.4.0 stable stable 2002-11-26 LGPL v0.4.0 ------ * phpSmartIRCclass.inc.php: - fixed serious socket bug The buffer of the socket got full because only 512 bytes were read at once, which caused losing some IRC messages that are comming fast like the MOTD. Now it will read 10240 bytes at once, and doesn't loose any IRC message. - fixed sendbuffer The sendbuffer will only be sent, when the class is fully connected and registered on the IRC network. Before if a nickname collision happened, all sent IRC commands from the buffer were ignored by the IRC server. - fixed socket status Socket handling is now compatible with PHP 4.3 dev. - fixed $_nick When the nickname got changed because of nickname is already in use, $_nick will be updated. (thanks for the hint to Andreas Streichardt). - fixed actionhandler ids (unregister caused that the other ids were changed). - fixed TYPE_TOPIC to the right bitoperator value. - added a reference to the IRC class in actionhandler callbacks WARNING: all user writtin methods have to be changed!! method( &$data ) _has to be changed_ to method( &$irc, &$data ) If you don't change those, your IRC scripts will _not_ work anymore! - changed internal methodnames to _methodname - changed sendbuffer Now it uses configurable senddelay, instead of static 2 messages per second (send flood protection). - changed TYPEs All TYPE_* are now bitwise constants, register_actionhandler() can now react to more than one message type. - added TYPE_ACTION for those common /me messages. - added timeevents Added method register_timehandler() unregister_timeid() and reordertimehandler(). Those timehandler can be used to call methods in specified intervalls, e.g. for timeevents. Added needed class CphpSmartIRCclass_timehandler. - moved all IRC related defines to defines.inc.php. - changed if() elseif() structures where possible to switch() for clearer/faster code. - added more debug messages for actionhandler. - added unregister_actionhandler() and unregister_actionid() method. Also added needed reorderactionhandler(), which is called after an unregister methods was called. - added $data->channel to actionhandler callback. * defines.inc.php: - initial import. - now all IRC related defines are now in this file instead of phpSmartIRCclass.inc.php. * DOCUMENTATION: - updated/added methods description * example.php: - changed user function parameter to new style ( &$irc and &$data ). - added TYPE_NOTICE to query_test example. 0.5.0 0.5.0 stable stable 2003-01-07 LGPL v0.5.0 ------ fixes: - fixed critical bug in the main _rawreceive() for() loop, messages were lost. changes: - License changed from GPL to LGPL. - updated in all files the copyright year. - changed documentation tags in front of all methods to the phpDocumentator compatible format. - improved connect() errorhandling. - changed login() parameters to $nick, $realname, $usermode = 0, $username = null, $password = null. - changed join() parameters to $channelarray, $key = null. - changed kick() parameters to $channel, $nicknamearray, $reason = null. - changed listenFor() parameters to $messagetype return value is now the result, instead the of a reference to the result parameter. - sendbuffer has now 3 queues: high, medium and low high sends 2 messages, then 1 of medium low is only send if high _and_ medium is empty. - select() call for sockets is strongly optimized new: - phpDocumentator package tags. - include() for messagehandler.php (needed for the new API). - setChannelSynching() method, for enabling the channel synching. - setCtcpVersion() method, for changing the ctcp version reply string. - setReceiveTimeout() method, for changing the receive timeout. - setTransmitTimeout() method, for changing the transmit timeout. - setAutoReconnect() method, for enabling the autoreconnect feature. - channel variable, a reference to _channels because $object->channel("#chan")->topic is not possible in PHP4 (ZE1). - reconnect() method, it will reconnect and also join all channels. - channel() method, getting a reference to the channel, only if channelsynching is on. - added ident, host, messageex and rawmessageex variables to the Net_SmartIRC_data class. - class Net_SmartIRC_user, stores info about one user, only used if channelsynching is on. - class Net_SmartIRC_channel, stores info about one channel, only used if channelsynching is on. 0.5.1 0.5.1 stable stable 2003-01-17 LGPL v0.5.1: ------- fixes: - major bugs in ChannelSynching fixed. - fsocks support fixed. - setUseSocket() method fixed. If false was passed as parameter, it tried to load the socket extension. Also warnings are now suppressed with @ in front of dl(). - fixed a typo in reconnect(). - missing SMARTIRC_DEBUG_CHANNELSYNCHING constant added. changes: - new design for HTML documentation used (PEAR template). - moved all examples to their own directory (examples/). - moved the documentation to docs/HTML/. - added new file descriptions to README. - removed not needed parts of DOCUMENTATION (most is now in the HTML version). - updated the HTML documentation. new: - example5/6/7.php added. - setAutoRetry() method added. Autoretrying of connecting to the IRC server, is now supported. 0.5.5 0.5.5 stable stable 2003-07-23 LGPL v0.5.5: ------- fixes: - fixed a bug in _rawreceive() messages were parsed wrong which caused problems with kick reasons. (thx to sniper for reporting this). - fixed bug in message() CTCP ACTION messages had missing \001 at the end. - fixed a bug in quit(), which caused quit messages not to be sent to the server. - fixed reconnect() bug, it sent the channel join requests right after connect(), and tried to join a channel without a name. - fixes in ChannelSync code When a user joins a channel after SmartIRC, no WHO info is updated in the user object. Fixed wrong update of channel mode when rpl_channelmodeis received. Fixed bug in _mode() method, which caused wrong handling of mode changes. Topic updates are now tracked (thanks to sniper). Fixed bug which caused fatal errors with ChannelSync enabled (closes sf.net bug #705269). Fixed bug in _event_mode(), unhandled modes were stored wrong. Fixed bug in _event_rpl_namreply(), which caused that the first char of the first nick of a namreply got cut (closes sf.net bug #747832). - fixed bug in _checktimer() Which caused problems when a timehandler is unregistered. - fixed _gettye() It wasn't recognizing SMARTIRC_TYPE_ACTION. - removed if(!$obj) check for newly created objects (closes PHP bug #24622), required for PHP 4.1.2 compatibility. changes: - removed all irc commands from SmartIRC.php they have now their own file (SmartIRC/irccommands.php). - Net_SmartIRC_messagehandler class now extends Net_SmartIRC_irccommands. - removed the 1. parameter (&$irc) of all message handlers, not needed anymore. - renamed class Net_SmartIRC_user to Net_SmartIRC_channeluser, added class Net_SmartIRC_ircuser. - added prefix _event to all message handlers (needed because of class restructuring). - tweaked filling of the ircdata objects. - log() now checks the passed debug level bitwise. - $data->message will be null instead of random garbage, if the IRC message has no colon (the message part), - All methods that depend on ChannelSync mode, checks if it's enabled. - Optimized the usage of time() for $this->_lastrx. - updated the URL of a SmartIRC based bot (atbs). - _loggedin is now set to false when the socket is dead, required for proper working reconnect(). - on a reconnect(), the logfile won't be overwritten anymore. - updated phpdoc tags. - all access to the channel array now uses strtolower() for the key. - fixed typo in function name setChannelSynching(), now it's called setChannelSyncing() with a BC wrapper. - removed all SMARTIRC_ prefixes for debug output. - changed isJoined($channel) to isJoined($channel, $nickname) for checking if the specified user is joined. - removed "destructors", because they don't free the memory. new: - added isOpped() isVoiced() isBanned(). - added debug output and debug level for the messageparser. - reconnect() uses now the channel key if one exists. - added channel key syncing in _mode(). - when an actionhandler message regex has a leading '/' then the regex is used as it is, this allows complex perl regex's. - added message type SMARTIRC_TYPE_CTCP_REQUEST and SMARTIRC_CTCTP_REPLY for more advanced CTCP. - added new log destinations SMARTIRC_NONE and SMARTIRC_BROWSEROUT (for firendly browserouput). When the script is called from a browser, the BROWSEROUT will automatic be used (closed sf.net bug #708155). - added error handling for socket_select() in _rawreceive(). - added getMessage() to Net_SmartIRC_Error class. - added debug level for ChannelSync code (SMARTIRC_DEBUG_CHANNELSYNCING). - added filename and linenumber to debug output. - added key property to channel class. - added to all IRC commands optional $priority parameter with default value SMARTIRC_MEDIUM. - added isError() for more advanced errorhandling, needed for encapsulation. - added _isValidType() method, which checks for valid SMARTIRC_TYPE_* types. 1.0.1 1.0.0 stable stable 2009-07-18 LGPL QA release Updated to package 2.0 Bug #1950 Constructor calls ignore_user_abort(true) - undocumented and not always desired amir Bug #3064 Doesn't work with php 5.0.3 meebey Request #4727 Req Regarding Examples amir Bug #5220 connect() returns in some situations no false amir Bug #6525 When joining empty channel channel array is wrong amir Bug #9848 fix for "Only variable references..." warning amir Bug #10118 quit command doesn't disconnect the socket amir Request #10119 Req CTCP version reply should be fully configurable amir Request #13056 Allow multiple actionhandlers to execute amir 1.0.2 1.0.0 stable stable 2010-10-25 LGPL Automatically built QA release Req #16526 Colour and bold codes are not supported - giggsey 1.1.0 1.1.0 stable stable 2014-09-03 LGPL * Fix Bug #12539: Flaw in timeout detection. [garrettw] * Fix Bug #13079: Does not support founder/admin/half-op modes [garrettw] * Fix Bug #14924: delayed timer with real socket [garrettw] * Fix Bug #16531: Nickname changes wrong [garrettw] * Fix Bug #17729: patch: Removed define_syslog_variables and avoided warning for socket blocking [garrettw] * Fix Bug #17769: file included with relative path [doconnor] * Fix Bug #18586: Register Action Handle only accepts one class [garrettw] * Fix Bug #18774: not compatible in strict mode [doconnor] * Implement Feature #16755: Not possible to join more than one chanel even if "$channelarray" is correctly [garrettw] * Implement Feature #18025: Bind IP for Net_SmartIRC_base::connect()? [garrettw] * Implement Feature #18403: Bug fixes, code formatting, added features [garrettw] * Silenced PHP warnings when socket_select() receives a signal [garrettw] * Added ability to dynamically reload client if user code supports it [garrettw] * Added ability to pass arguments from user code to modules [garrettw] * Added ability to send custom raw commands immediately after login() info [garrettw] 1.1.1 1.1.0 stable stable 2014-10-02 LGPL * Fix Bug #20419: Need a getter for the current bot nick [garrettw] * Tweaked a few execution modifiers [garrettw] * Removed limit on number of high-priority messages that can be sent before other priorities [garrettw] * Tweaked logger output [garrettw] * Updated HTML documentation [garrettw] 1.1.2 1.1.0 stable stable 2014-10-03 LGPL * Corrected package structure [garrettw] 1.1.3 1.1.1 stable stable 2014-10-23 LGPL * Fix Bug #20428: setBindAddress sets wrong variable [garrettw] * Fix untracked bug: loadModule() and unloadModule() don't work right [garrettw] * Added loadedModules() method which returns an array of the loaded module names, since $_modules isn't accessible publicly [garrettw] * Updated HTML documentation [garrettw] 1.1.4 1.1.2 stable stable 2014-11-02 LGPL * Fix Bug #2309: Channel list message parsing error [garrettw] * Implement Feature #7321: Please Add SSL support [garrettw] * Implement Feature #20429: IPv6 socket support [garrettw] * Eschewed socket_*() functions in favor of stream_*() functions, thereby deprecating setUseSockets() [garrettw] * Fix untracked bug: unloadModule() still didn't work right [garrettw] * unregisterActionId() and unregisterTimeId() now accept arrays of IDs [garrettw] * Updated HTML documentation [garrettw] 1.1.5 1.1.2 stable stable 2014-12-25 LGPL * Fix Bug #20469: array syntax mismatch [garrettw] 1.1.6 1.1.3 stable stable 2015-01-17 LGPL * Fix Bug #20475: NAMREPLY/WHOREPLY being parsed incorrectly [garrettw] * Fix Bug #20485: odd case where stream_select() has data and fgets() doesn't [garrettw] * Fix Bug #20486: "Illegal string offset" error in _removeuser() [garrettw] * Fix Bug #20487: RPL_OMOTDSTART and RPL_OMOTD occurred twice in defines.php [garrettw] * Fix untracked bug: channel's users not added to array of their channelmode [garrettw] * loadModule() can now load classes that already exist; no longer forces use of external files [garrettw] * listenFor() can now take an additional parameter: the regex to match on [garrettw] * Improved code for action/time handlers [garrettw] * Updated HTML documentation [garrettw] 1.1.7 1.1.4 stable stable 2015-04-18 LGPL * Added fluency (some methods now return $this) [garrettw] * Unknown message codes can now be handled instead of failing [garrettw] * Improved setRunAsDaemon() [garrettw] * Fix strict warning on stream_select [markcarver] * Updated HTML documentation [garrettw] Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/branch.gif0000620000175000017500000000010612514342261023314 0ustar ubuntuubuntuGIF89a€џРРР„‚„!љ,@„ЉЫэЃœДкKУе–WŸm€FŽ&x ’Б›;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/branchbottom.gif0000620000175000017500000000011012514342261024534 0ustar ubuntuubuntuGIF89a€џРРР„‚„!љ,@„ЉЫэЃœДкKУе–WŸm€FŽ&ˆЅЊT;ІT;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/branchtop.gif0000620000175000017500000000010312514342261024034 0ustar ubuntuubuntuGIF89a€РРР„‚„!љ,@„ЉЫэЃœДк‹Го\№…рјyWYЁ”к;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/Class.gif0000620000175000017500000000206512514342261023132 0ustar ubuntuubuntuGIF89aї9JRk{ЕНЦж!œ)œЦcо!RжН!Rж)RЮ)kЅ)sЅ19B!BZ­JJ!1Rcckck„kkk)sss!ss1ss„s{s{s„{{{)){B1{s!{s){sB{{{{{{){{9{„{„{„1{„œ{Œœ„„{„{{„„„„„„„„c„„k„„œ„Œ{„Œ„„ЮжŒ{{Œ„1Œ„BŒ„sŒŒŒŒkŒŒ”ŒŒœŒ”­Œœ””cc”„s”Œk”Œs””s””„”œ”Цжœ!!œ)!œckœ„„œŒŒœ”1œ”Œœ”ЦЅЅ1Ѕ!!Ѕ„„ЅŒŒ­­­!)ЕН!!НџџЦЮџџжжж!жџџоо9оџїоџџччяячїячїџчџџячsяччяячяяїяїчяїяяїїяџїяџџїяяїїcїїяїїїїїџїџїїџџџжЮџжжџжоџочџчоџччџячџяяџї{џїяџїїџїџџџkџџНџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ў? HА Сƒ&КtщЁ7o4`PpЁE&њCh’6 "8 РУ $O>-"dчM ( ˆ"Ш`ЄI–њ(ЊЃх ƒЈX„q`Є/IŠєD 8ТрЃ-eNˆ˜tЉШbŠЙтЇ!A6nаєт'M3L(ЩtpM8.Jt˜ J4Xh2˜&Ž2*Xё‰5nl"‰Ы5КœqтУP4rЄ˜еВ…ŒV’\„‡P Ox6x№Р ГЉ $Z”I )й ^(Ш:ЦK„єЪ“АО§ћ;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/classFolder.gif0000620000175000017500000000210412514342261024320 0ustar ubuntuubuntuGIF89aї19B91R11!kZ)!)19ZJ9s!s{Rs”!{{{k{„k{Œ{„{„{R„{Z„{k„{„„„c„„k„ŒŒ9Œ{Œ„Œ„sŒŒZŒŒcŒŒkŒŒsŒŒ{ŒŒŒŒ”sŒЮ„”s”„R”„c”„Œ”Œk”Œ„”Œ”””B””c””k””„”œ{œJœ„œ”kœœЅœЅ„Ѕ!Ѕ!J­1­s­”c­ЕœЕЕЕНkЕН­ЕЦBНЕsНЦŒЦЦ!Ц)Ц­ŒЦЦЅЦїkЮЮ1ЮЕkЮЮZЮЮsжЦcжЦ­жЮŒжжŒжж”жжœооœоч„очЅоїRчж{ччRчїНяЅЦяЮkяоsяя”яїїяїџяџНяџжяџяяџїї!ї­ŒїЕsїчRїяœїї”їїЕїїяїїїїїџїџїїџџџœsџ­{џЦ„џЮœџж„џжœџоŒџоЕџооџч1џчœџяЕџяџџїНџїжџїяџїџџџ9џџJџџЅџџ­џџНџџЦџџЮџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ў3 HА Сƒ 6Ъ„)ЯЅ=˜"цСдЈb&>ab„Щв%.Ь„Ї &<(jЄPБb=ёœ,˜gЧ/\ю8сАFž5—8fДqФ 5JЬ,‚‹.elQi$H“мАa“ˆбЂJ.dA) šAR"0aЫ1,dD!‰L …8РР‹š,+фldCбЁ>BЮ4@ С&jд@iN”$C(T€Ae ,мГBвŸ'qЊdˆQЦ‘ЃiD =Q+H )Bч‘!ZdДQ @r5СбЁУD<дCcФFf|rAФ‡+4*@(ˆG€ш$  € D|SrЭ8|ишЩdџM&6#%$р€;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/Disk.gif0000620000175000017500000000170312514342261022755 0ustar ubuntuubuntuGIF89aї111999BBBBBJJJJJJRRRRRRZZZZcccccskkkkkssssss„ssŒ{{{„„„„„Œ„„”ŒŒŒ”””œœœœœЕЅЅЅ­­­ЕЕЕНННЦЦЦЮЮЮЮЮожжжооочччяяяїїїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ЈIHА Сƒ*\ШАЁC8|бЁУ‡C€иа`$4ŽшАЁF‚>€р Є#Bx@!A 4pAёC ˜рA *DР ЁC…ŽИ№`A"pР!„ 0PpР€Q‚!8@h@Cƒ@Аƒ#D8M ЁР\ BœDј2Ув"/Ь вЁуЧ#KF;Net_SmartIRC-1.1.7/docs/HTML/media/images/TreeMenuJS/file.png0000620000175000017500000000075112514342261023023 0ustar ubuntuubuntu‰PNG  IHDRыŠZ,tEXtCreation TimeTue 29 Jan 2002 20:17:29 +0100žu‡PtIMEг/­Г pHYsttk$ГжgAMAБ ќa@IDATxкcќџџ?Й€‰l@Рg566тQW__Eє? 444ќџ§+:pрHыьњъLЇБЃгССТhhhљџџ7išџџ~a0ВŠ ‹3ТЃjљщpб_зЖ$ЄЗ-;| .iеŒХfИN 6ИмьU;рьe]6/Џ2|C+7Џn‡2!+]жеЧё7o]Г‹ŸSУ<<€6/МТВrVŸѕџћџ]3PЯš-W€ŒЏ @уesыˆ H„Г­јP›В'жьФE8[.Ф$N•;тuў$Ь€ˆћИи#тŽЯfdє6у‡{џ_o"|ю†ЄRŸ ‚Єd= bd‚pЎcaPa`р€А‘г6"‘Lє‡а$mDp@€Ч'E’<§љДˆ70  0 Š O•"MВдGQ-oА @ХЂE‘^М`$)в=<€рСG[Ъœ1щR‘$Ф!rХЯЅFlм щФ'Nšf˜P’‰ЂFkтРqQЂУ„L`јPЂСBS'FiтШ!УЁ‚˜шСQуЦ&H\ЦЈљахŒ†šа ‘#Х&I08l˜bцЧAVр"ф“J&yљЦO'M:FаcKž>љ9тч“ NC– ёРJ’C‹№ Є"DЂ$ЄЩ Fє№e —,=˜H)тDˆ^ЈЙх +=BD!ђЄHЋ['єlE0‰ J` Шј%ŒŸГєvСYЬAуЧ' ќьХ‹0;Net_SmartIRC-1.1.7/docs/HTML/media/images/Constants.gif0000620000175000017500000000205412514342261022056 0ustar ubuntuubuntuGIF89aї!ZkcJ{s„{ŒŒkkџџcJŒ„ZR„s”{œ”їїїџџџ!sZ!„s!ŒŒ!їя)cZ)sB)Юж)чо)яя)џџ1{J1{Z9kZ9”Ѕ9жчBжЮBчяBїџRоЮRччRячZ””s„ks”Œsџџ{{R{{Z{{c{{k{{s{Œ{{Ц­„{Z„{s„„k„„s„„{„Œk„Œs„”k„”„„œŒ„ЮЦŒ{sŒ„ZŒ„sŒ„{Œ„„ŒŒcŒŒsŒŒ{Œ”cŒж­”ŒR”Œ{””{””„””Œ”œ{œŒ„œ”cœœ{œЮ”ЅН{ЅЦcЅжН­œ„­œŒ­Ю­ЕНZЕџџНЦŒНЮœНжŒНя­НџџЦЕ”ЦН{ЦН”ЦчЅЦяНЦїЕЦџяЮЦ{ЮЮcЮжŒЮїНжЮkжч­жя­ооЅочŒчо­чч­ччїчїЅчїЮчџжчџччџџяч„ячŒячяяяяяїчяїяяџœяџяяџїяџџїччїяНїїяїїїїџЅїџЦїџжїџїїџџџяœџяџџїжџїїџїџџџЦџџЮџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ў7AšДЩ‘ЃF€4§)ш(QЃLv6Mђ#)SІFš6I4Ј аІ?†Др@вУ"…6j$I ™:_№p BЈбIM4i*BF4L0iёQ$aДHš *hГЃ M9”ч…@x(СŒ% &хЈd%ƒ‰ * 0@ N›&ёX$F *(hP‹" &с{`Œ Œ ЈЫ“МJ*схФ  Ьa3GG€I5*…г!ӘюМсГІIP"-К‚& xЪ<*shG€M<œФXђУ… 3Ј4!R%GG,А@€эм`Р€AI›Nf’„ˆaCG;Net_SmartIRC-1.1.7/docs/HTML/media/images/Constructor.gif0000620000175000017500000000202412514342261022424 0ustar ubuntuubuntuGIF89aї!)1BJs{Œs”sчZsНя!{!ж!!о)Ц))ж))я)1”11­!1Н)1Н91о11о91я19”)9Н99Ц19Ц99Ю)9ч9BЮ9Bо9BоBJ„JJœRJНBJЦRJоJJчBRЕBRЕRRЮRRоJZ”ZZ”cZЅZZНRZНZZжZZоJcЅscчZk„kkŒckНcsЦs{„s{„{{”{{œ„{­Œ{Ю{„”{„­sЕџ­Нџ­НџНЦџНЮџЮжџчоџжоџочїїчџжчџочџччџяяяџяїяяџчяџяяџїяџџїяџїїїїїџїџяїџїїџџџяџџїїџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,љЧ 3цŒС0gШŒ“†ŒУ4@˜0Œ@2iРh!ƒЦ  гˆ4и 2 Ј `с’ЭЄ‘ЁA\Фt S&!C0c4јB†‹)[Ц„!Ъq € ЃарСdŠв†fФˆщ&M–#04ќ`rЅЫ˜.`а`)јЅ‹+BФ€"ХЪ•4TjQrХ…VЈx"Ї\p$!Ё#‚ƒ8`xёЂ •4F†Мрсс‚ 2HёсЪТ)Nˆ`A@#0 (Ё '@д˜P ЧŽ=fЬ@Sа —+’9‚G‹%ADіЬ(†‘" НŒб;Net_SmartIRC-1.1.7/docs/HTML/media/images/Destructor.gif0000620000175000017500000000202312514342261022234 0ustar ubuntuubuntuGIF89aї!)1BJs{Œs”sчZsНя!{!ж!!о)Ц))ж))я)1”11­!1Н)1Н91о11о91я19”)9Н99Ц19Ц99Ю)9ч9BЮ9Bо9BоBJ„JJœRJНBJЦRJоJJчBRЕBRЕRRЮRRоJZ”ZZ”cZЅZZНRZНZZжZZоJcЅscчZk„kkŒckНcsЦs{„s{„{{”{{œ„{­Œ{Ю{„”{„­sЕџ­Нџ­НџНЦџНЮџЮоџжоџооџччїїчџжчџочџччџяяяџяїяяџчяџяяџїяџџїяџїїїїџяїџїїџџџяџџїїџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,јЯ„ІŒС2b†У0Ё™‡gОѓ%Œ™„_ВP$Cц!—3g ‚c†Ь0 L‰eЮ4 €Ъ•[Р”,у%цЧ, ЧxщВ +Нˆщbц С„gЂЬиБ$JA†fР€стх –#/2јXb…‹Ы/fЎ„9у…K*@РxЅŠ•3S\fI"ЅEƒVЄhфI†[n ‘B@\H!ƒЫ”3E„ИибС*`ˆсi˜(L„X1a‡"0”(ЁѕЫ–&>а@‡FL0рa‚4ЊTi@A „˜№ŠlHpa„ХŸD рA"’*M:Ђ ”јтUЋ*$3…<„лсС2ŽаРЖmлOD @ЗЎ]К\`P €пП€>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~€€€‚‚‚ƒƒƒ„„„………†††‡‡‡ˆˆˆ‰‰‰ŠŠŠ‹‹‹ŒŒŒŽŽŽ‘‘‘’’’“““”””•••–––———˜˜˜™™™ššš›››œœœžžžŸŸŸ   ЁЁЁЂЂЂЃЃЃЄЄЄЅЅЅІІІЇЇЇЈЈЈЉЉЉЊЊЊЋЋЋЌЌЌ­­­ЎЎЎЏЏЏАААБББВВВГГГДДДЕЕЕЖЖЖЗЗЗИИИЙЙЙКККЛЛЛМММНННОООПППРРРСССТТТУУУФФФХХХЦЦЦЧЧЧШШШЩЩЩЪЪЪЫЫЫЬЬЬЭЭЭЮЮЮЯЯЯааабббвввгггдддееежжжзззииийййккклллмммнннооопппрррссстттуууфффхххцццчччшшшщщщъъъыыыьььэээюююяяя№№№ёёёђђђѓѓѓєєєѕѕѕіііїїїјјјљљљњњњћћћќќќ§§§ўўўџџџ,ўџнгЇяŸ>x№ФLс0С‚>~ј |ЇOЎu$H`H€шп>yўо§уЇЏМ.S(”@@‰о?|юцхKЗ.x)&Ј0@‡?wA‚„“чŽб<[X€ˆ К"HDˆ˜ЇЯа 5› ‚фNŸИ'@fœР№bЄ>8cњмуwO(JHœAро"nыкАбз/‘(QŠD8АHŽЛeuфМ™ГЏ!K,а™„HŽ9>mкЬYѓ1JqѕДцЮ9u№ „ЏнМE*ЙыЇ—6xи0”Яп?wˆм§ЃзаŸ4mВЧОyћиэЛзOРˆ$щѓЗЏ9wŸќьѕ#дЧ’є~ћцyєGя9П|ЉЦ ;Net_SmartIRC-1.1.7/docs/HTML/media/images/I.png0000620000175000017500000000022412514342261020306 0ustar ubuntuubuntu‰PNG  IHDRЮ ж!tIMEа %*лњ№U pHYs № №BЌ4˜PLTE—Ž{џџџRHtRNSџхЗ0JIDATxкcј_џ€сџ &6{)сƒaХIENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/L.png0000620000175000017500000000023112514342261020307 0ustar ubuntuubuntu‰PNG  IHDRЮ ж!tIMEа %"е!xg pHYs № №BЌ4˜PLTE—Ž{џџџRHtRNSџхЗ0JIDATxкcј_џ€сџ ЦE‡:@hь4o*—OkckIENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/leftbg.gif0000620000175000017500000000151012514342261021341 0ustar ubuntuubuntuGIF89aвїЮЮЮїїїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,в-HА Сƒ*\ШАЁУ‡#JœЈ€€‹1RмШБЃЧ C2Ę1c@;Net_SmartIRC-1.1.7/docs/HTML/media/images/Lminus.png0000620000175000017500000000033312514342261021366 0ustar ubuntuubuntu‰PNG  IHDRъYQtIMEа %§#Рљ pHYs № №BЌ4˜0PLTEџџџ—Ž{y8ЧtRNSџхЗ0J0IDATxкcE!Р &6Q% P„0!J№0ˆQ‹d.Š0˜4i 7gЄЛ­IENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/Lplus.png0000620000175000017500000000034012514342261021214 0ustar ubuntuubuntu‰PNG  IHDRъYQtIMEа '/™ІfX pHYs № №BЌ4˜0PLTEџџџ—Ž{y8ЧtRNSџхЗ0J5IDATxкcE!Р &6Q% P„0!J LFlLFEEEм & ™‹т &Љ їLу)—IENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/minus.gif0000620000175000017500000000010012514342261021223 0ustar ubuntuubuntuGIF89a ‘rrrјќј!љ, ŒЂ+Цы^ X;e–ёЁ;Net_SmartIRC-1.1.7/docs/HTML/media/images/msgError.gif0000620000175000017500000000174512514342261021710 0ustar ubuntuubuntuGIF89aїk11s11{1)„)1”))œ)9Ѕ)1яџїяџџїїїїїџїџџџочџччџчяџяяџяїџїяџїїџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,Ъ<а€ƒ34 j@РТ ФP 2X  ТЦˆhИpB–t€0РЪ  РyAC„ xРr‚^>€,#,PЁA h с! H р +… jА@!‚ ДbАXVЅƒ  ЁюУ‡hZАPР…Иw…иысУадJpтGXTБr†Šџb€јpєУeSџеБgпЪ!;Net_SmartIRC-1.1.7/docs/HTML/media/images/msgFatalError.gif0000620000175000017500000000202012514342261022643 0ustar ubuntuubuntuGIF89aї!)19BRŒ)!œ!)œ))­­!)Е)!Е)1ННННН!ЦЦЦ!Ц!)ЮЮЮЮ!жжооооо!чччяяя!яџџїїїїїяїїїїџџџџЦНџЦЦџЮЦџЮЮџжжџчоџччџячџяяџяїџїяџїїџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ѕu№XбЂХ  "\СC Ь Ac†"(рдЈ №h С hиАAƒ† œhЃ@† 0b0 Ц† R ъ Р ƒ.˜А-ˆ~T№ „ˆ (0Дуа,`К€@Œ;zф.ШƒпhЬmЁЛBoмШqCуё”Ф9яб#aє;Net_SmartIRC-1.1.7/docs/HTML/media/images/msgHint.gif0000620000175000017500000000173512514342261021520 0ustar ubuntuubuntuGIF89aї!19)9BJ9BJЕЕ­ЕЕЕННЕНННННЦЦНжЦЦНЦЦЦЦЦЮжжЮяячяяяїяџїїяїїїїїџїџяїџїџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ТG1ЂƒF 8"DA"2p €‚‚":0ШAA 'PтЁ‡€мТƒУ 4žдр Тˆ q2ТEdlИ€K "0P!a–,rР дƒ‚ƒB,@а „C”ŽPPсƒЫ К†0XЁРвŒO `iPlAn.p`СЩ4 ЁЁз†„n$Xё‚C lXc‡˜hмЬа ‚ E Ьs3VXŽ;Net_SmartIRC-1.1.7/docs/HTML/media/images/msgInformation.gif0000620000175000017500000000170312514342261023076 0ustar ubuntuubuntuGIF89aї)19119B19!J)!Bчоџччџяяяяяџїяџїїяїїїїїџџїџџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,Ј#PЈ@B… *DHС ТŒ0AсСˆ%TЈш` Rмш`‚ˆhЄ БТ*J`9pТ@ƒ& PR!Ыˆ4.˜№`‚Щƒ)+ЬШ@D‘*՘г\‚Tи@тŠ28Б„Є(€`ьТ3Л”PTцG FшyДрмГ+tЌ8Б0ЫЎ9-&Ќ ЗрВH–;Net_SmartIRC-1.1.7/docs/HTML/media/images/msgWarning.gif0000620000175000017500000000202312514342261022212 0ustar ubuntuubuntuGIF89aї!!чя!чяJчяRчяZчяччїZяяcяяkяя{яї9яїRяїZяїяяїїїяBїя„її)її9їїїїїџїџїџ)їџ9їџBїџcїџ{їџяїџїїџџџїBџїZџїжџїоџџџџ!џџ9џџBџџJџџZџџЮџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,јkЈ1ТЦ7lА1B` HЈPE€1hPœhƒ5jФ Р€5JtД№БA $€` `‰K4(1 $8ЃсNŠ6dР €ША1Qх&œ0pрФ„(,t`С‡  \Ё РX€шp & xШс`  :ДИpСD‡Rа8(c„ +ъ"ИАТ2hд˜!ˆ '8‘3jX ! Тƒ"D€@!D4XVI@@oР}ЧЈРЁD 3fЄ‘Х 3 ”јёу† ЋK ;Net_SmartIRC-1.1.7/docs/HTML/media/images/openfoldericon.png0000620000175000017500000000035012514342261023124 0ustar ubuntuubuntu‰PNG  IHDRэнтRtIMEа 1F…B pHYs  вн~ќPLTEџџŸŸџџџџЯŸџџŸЯЯ`шYУрtRNS@циfYIDATxкeЬС €0@Qtƒ^znщ7'я˜Иџ jМјOЏ №Е"N Ђ–ƒнlCl #ђ 3Ьn‡O9jBєЌsGИї€ЊВїјP„љ*№ž–’СЏŸФ›…IENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/pearlogo.gif0000620000175000017500000000213212514342261021707 0ustar ubuntuubuntuGIF89ah2ФџРРР§ў§5š№јьјќіќўћ7›9œ>Ÿ GЄ[Џ*kЗ>ѕњђшѓс{СKТрЌеъХс№е™ЯiЏн‚ћ§љТъТц–аіšЩю–ЭёšЬ№™ўў§џџџ!љ,h2@џ ŽdižhЊЎlыVZ< ІЫ€}WRяџ RbБј§`Б Bt˜мfЂХd*A9Ю2щM,‘Bі‘0!oшtЅpAр"!е‘’ [OЂчjЈCСяЮПЖ™fiрЩ"`H—IVТVЛ7Ѕиз\аO(.ќQ% 1Пммs!ЯтHA&7ЗС†)o’RдjvЈјр7O,0РьPвуˆ%@X GaF№рйСЃШ…P4ѓ„–$ЃѓшЈрЂB iƒљАЭ‚&!2„‡%AЂ ёЁхJЁO’@*d‘ 9”РXЩФчK›MRnтdч(J^і4Rd)Ы‘(Ož0щВJ(QVрˆёгЮ :ў\њЃ'У#PN0БiФТ5 љЁТ'PaДбфТЃAZT(9Ёa’Ј!0rР(Г&ЯЁ<н%IN+>Ь0“ЦQtќОйтЦF‚LЈ cЄLЂD‚ђќЈrˆ… &|иуF"9”І(С!D„\И@c„$J”ж@СB†…„ИрЁФЄIŒ•90ЂG„Ex˜стE(рŒ н@`.yˆд ’ф'#J“"…’" DDˆ&… ;Net_SmartIRC-1.1.7/docs/HTML/media/images/ProtectedProperty.gif0000620000175000017500000000205412514342261023600 0ustar ubuntuubuntuGIF89aї!!!!ccccksksks1skssss!s{{s{{{{{{{{1{{B{{Z{„{„){„R„{„{„{„{!„{)„{9„„„„„„9„„B„ŒŒ„Œ„)Œ„BŒŒŒŒ1”Œ””””1””9””B”œ”œ1œŒ­Ѕsоч1очkчч)чч1чч”ячZячŒяя)яя1яя9яяRяяZяяџяї!яї9яїkяїчїяBїяRїя{їя„їяяїїїїїї!її)її9їїBїї{її„їїЅїї­їїЦїїЮїїчїїяїїџїџJїџRїџcїџчџїџї)џї1џї9џїJџїRџїZџїsџїоџїчџїяџїїџїџџџџџџџџџ!џџ)џџ9џџBџџJџџRџџcџџkџџsџџ{џџ„џџŒџџ”џџœџџ­џџЕџџНџџЦџџЮџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ўйd4h Ђ!‡ОbУfЭЁ‡hl0ˆбСEB…˜ 2”х"ъмИPEЩA„Pк‚Ј†(DК̘pA„&Nh8„(’Dцм ух .ьв Ь'FVTаqd –…[ЦP)ЊK&8АXвDЪ2PМ`ЉBdJ  ,˜(‘ЄЧ’,ЏЬђЁ p˜PТ(d‚јPq#ƒ D аBQ/LˆшpтA АXqEЫ‹ дДiу =А Љb… 28t#DŠ-4rTЁЅХŽhdУ@ $VЈфАвCУ…8з$гЅХVvtАp@€Ц6jЈІ‹ -4<0иЭ %Ъ“т‹‹ (€у” NœQ!Ц & ’pF !&œљ!&F ž\М‘!$DА•m2Ъ%вцIš3pЅ" ;Net_SmartIRC-1.1.7/docs/HTML/media/images/spacer.gif0000620000175000017500000000006712514342261021361 0ustar ubuntuubuntuGIF89a ‘џџџџџџ!љ, ”ЉЫэc+;Net_SmartIRC-1.1.7/docs/HTML/media/images/spacer2.gif0000620000175000017500000000014612514342261021441 0ustar ubuntuubuntuGIF89aГџџџџџџ!љ,PШIЋН8ыЭЛџ`(Ždiž(;Net_SmartIRC-1.1.7/docs/HTML/media/images/T.png0000620000175000017500000000023012514342261020316 0ustar ubuntuubuntu‰PNG  IHDRЮ ж!tIMEа #;чw! pHYs № №BЌ4˜PLTE—Ž{џџџRHtRNSџхЗ0JIDATxкcј_џ€сџ ЦE‡:р“o)ЭеЕIENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/Tminus.png0000620000175000017500000000031712514342261021400 0ustar ubuntuubuntu‰PNG  IHDRъYQtIMEа &Хb l pHYs № №BЌ4˜0PLTEџџџ—Ž{`*4tRNS@циf%IDATxкc`l›Ј  Єё3•”€€ЕHцтwФMN,]IENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/Tplus.png0000620000175000017500000000033612514342261021231 0ustar ubuntuubuntu‰PNG  IHDRъYQtIMEа 'СЮ*I pHYs № №BЌ4˜0PLTEџџџ—Ž{y8ЧtRNSџхЗ0J3IDATxкcE!Р &6Q% P„0!J LFlLFEEEм & ™‹п Й рдIENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/images/Types.gif0000620000175000017500000000203112514342261021201 0ustar ubuntuubuntuGIF89aїssZsscs{J{{R{{c{{k{{s{„Z„„R„„c„„k„„s„„{„ŒZ„ŒkŒŒZŒŒcŒŒkŒŒsŒŒ{ŒŒ„Œ”k”ŒŒ””s””{””„””Œ””””œcœ”„œ”Œœœ„œœŒœœ”œЅsЅЅs­ЅЅ­Ѕ­­­”Е­­ЕЕ”ЕЕЅНЕЕНЕННН”ННœННЅНН­ННЕНЦŒЦНЮЦЦŒЦЦœЦЦ­ЦЦЕЦЦНЦЦЦЦЮŒЮЦЮЮЮŒЮЮ”ЮЮœЮЮЕЮЮЮЮжsЮж{Юж„Юо{жЮЦжжЦжо”жоœжоЅожоооЅооЕочŒочœочЅояŒчч­чяЅчяЕяяНяїЕяїНїяяїяџїїНїїЦїїоїїяїїџїџЕџїяџїїџїџџџЮџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ўЧА)fС5eи DИFЭ…eдЈљђАLB6Щ Г…D С C№т–- Й’CE2lИh,ЃI•&6АДˆА!B„ &8cЦЬ ,x3цЬ™и`а’%†‡!_да№Х‡”и@0cуB1k^$Yq"Š‘ И|8sхABx]P(Ѕ€2 Ю”]ЃтЦ "3B‰тряЊО$сA$ F–LсŒ&fа`‘&“%lёpцI&HdШ0 (Ќ№€С lXаС‚ ЌC`@€>њєŠe*rI˜&C„;Net_SmartIRC-1.1.7/docs/HTML/media/images/Variable.gif0000620000175000017500000000203312514342261021624 0ustar ubuntuubuntuGIF89aї!)1JRZck{„Œ”œЅ­ЕНЦЮжояїџ)JЕНЮоїџЮc{œ­чcsŒ”œЅНжџŒ”НЮїжB{œЮоJcs{„ЅJkŒжжџояџчччччџчяячяџчїџяячяяяяяџяїџїяџїїчїїяїїїїїџїџчїџяїџїїџџџїџџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ўЙ@с"e‹.\ЈLсrхЪ+VйВ (XžXtшp‹A,‡єpтф .OИhйТ% r( Ђ$&[И`qЂ ТŽ : 0№с„Ъ“-GЈ‰1ƒТ NшPB—œT|А˜P#C 5^8№1@!'?аАpФ… L$АКJ%lLј№‚„ ЬBх@ %FDt№@У‚ЎPIШУˆ #ŒHh #Ё 2I%. АHАA,Y:сaР ' €€х$ТР р^€–# Зц‚d‹(YnР"ХaС…Б‘‡ц2ХJ”*V;Net_SmartIRC-1.1.7/docs/HTML/media/images/Vars.gif0000620000175000017500000000205012514342261021011 0ustar ubuntuubuntuGIF89aї!9BRZks{œЅжояB)9­19Œ”Цжч{Z!cяZs”{Œ„!­sscss„ss­s{1{sk{s„{{R{{k{{s„„c„Œc„ŒkŒ{sŒ„sŒ„{Œ„„Œ„ŒŒ„œŒŒJŒŒcŒŒkŒŒ{ŒŒ””Œk”Œs”Œ{””{””„””ŒœŒ„œ”„œЅcЅЅ{­­оЕНkЕНоНЕ­НЕоННcННџНЦRНЦZНЦsНЦŒЦНœЦЦœЦЦ­ЦЦЦЦЮsЮЦsЮЦœЮЦЅЮжkжжЮоо­ооНоожооџоч”очЅочжчо­чоЦччЅчяŒчяЅяя„яяЅяяџяїЕяџŒїяНїяоїїœїїЦїїжїїчїїяїїїїїџїџїїџџџяџџїяџїїџїџџџЅџџЮџџжџџоџџчџџяџџїџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ,ў§єQФЇ`Ђ=іт'?zќ( ("‹Š ЪЈHЂ=F€ ‚CЂ:џhDЈ$Ы-eИ йгP AјŠёe 1P"Pyсc‡Ž=6ю(DHOœ(Ќˆ#ШP!ј‘SЧ‰ 80H! ›#б ДE…lH СMі$ЁЃч…,0PтIМŠbŠ‚… `€0h b…Ш„ј“Х ЮTiSФB %xРд`‚OhТДщb@ ЬtВд‘‚сB™'sІАЉ­gЧШBdјpAƒ ŒMZXP”Јы”ШN"; ~і$ъ#Huѓ{ЈїщЃ' ;Net_SmartIRC-1.1.7/docs/HTML/media/lib/classTree.js0000620000175000017500000004203012514342261021175 0ustar ubuntuubuntu/*----------------------------------------\ | Cross Browser Tree Widget 1.1 | |-----------------------------------------| | Created by Emil A. Eklund (eae@eae.net) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------| | This script is provided as is without | | any warranty whatsoever. It may be used | | free of charge for non commerical sites | | For commerical use contact the author | | of this script for further details. | |-----------------------------------------| | Created 2000-12-11 | Updated 2001-09-06 | \----------------------------------------*/ var webFXTreeConfig = { rootIcon : subdir+'media/images/Class.gif', openRootIcon : subdir+'media/images/Class.gif', folderIcon : subdir+'media/images/Class.gif', openFolderIcon : subdir+'media/images/Class.gif', fileIcon : subdir+'media/images/Class.gif', iIcon : subdir+'media/images/I.png', lIcon : subdir+'media/images/L.png', lMinusIcon : subdir+'media/images/Lminus.png', lPlusIcon : subdir+'media/images/Lplus.png', tIcon : subdir+'media/images/T.png', tMinusIcon : subdir+'media/images/Tminus.png', tPlusIcon : subdir+'media/images/Tplus.png', blankIcon : subdir+'media/images/blank.png', defaultText : 'Tree Item', defaultAction : 'javascript:void(0);', defaultTarget : '', defaultBehavior : 'classic' }; var webFXTreeHandler = { idCounter : 0, idPrefix : "webfx-tree-object-", all : {}, behavior : null, selected : null, getId : function() { return this.idPrefix + this.idCounter++; }, toggle : function (oItem) { this.all[oItem.id.replace('-plus','')].toggle(); }, select : function (oItem) { this.all[oItem.id.replace('-icon','')].select(); }, focus : function (oItem) { this.all[oItem.id.replace('-anchor','')].focus(); }, blur : function (oItem) { this.all[oItem.id.replace('-anchor','')].blur(); }, keydown : function (oItem) { return this.all[oItem.id].keydown(window.event.keyCode); }, cookies : new WebFXCookie() }; /* * WebFXCookie class */ function WebFXCookie() { if (document.cookie.length) { this.cookies = ' ' + document.cookie; } } WebFXCookie.prototype.setCookie = function (key, value) { document.cookie = key + "=" + escape(value); } WebFXCookie.prototype.getCookie = function (key) { if (this.cookies) { var start = this.cookies.indexOf(' ' + key + '='); if (start == -1) { return null; } var end = this.cookies.indexOf(";", start); if (end == -1) { end = this.cookies.length; } end -= start; var cookie = this.cookies.substr(start,end); return unescape(cookie.substr(cookie.indexOf('=') + 1, cookie.length - cookie.indexOf('=') + 1)); } else { return null; } } /* * WebFXTreeAbstractNode class */ function WebFXTreeAbstractNode(sText, sAction, sTarget) { this.childNodes = []; this.id = webFXTreeHandler.getId(); this.text = sText || webFXTreeConfig.defaultText; this.action = sAction || webFXTreeConfig.defaultAction; this.targetWindow = sTarget || webFXTreeConfig.defaultTarget; this._last = false; webFXTreeHandler.all[this.id] = this; } WebFXTreeAbstractNode.prototype.add = function (node) { node.parentNode = this; this.childNodes[this.childNodes.length] = node; var root = this; if (this.childNodes.length >=2) { this.childNodes[this.childNodes.length -2]._last = false; } while (root.parentNode) { root = root.parentNode; } if (root.rendered) { if (this.childNodes.length >= 2) { document.getElementById(this.childNodes[this.childNodes.length -2].id + '-plus').src = ((this.childNodes[this.childNodes.length -2].folder)?webFXTreeConfig.tMinusIcon:webFXTreeConfig.tIcon); if (this.childNodes[this.childNodes.length -2].folder) { this.childNodes[this.childNodes.length -2].plusIcon = webFXTreeConfig.tPlusIcon; this.childNodes[this.childNodes.length -2].minusIcon = webFXTreeConfig.tMinusIcon; } this.childNodes[this.childNodes.length -2]._last = false; } this._last = true; var foo = this; while (foo.parentNode) { for (var i = 0; i < foo.parentNode.childNodes.length; i++) { if (foo.id == foo.parentNode.childNodes[i].id) { break; } } if (++i == foo.parentNode.childNodes.length) { foo.parentNode._last = true; } else { foo.parentNode._last = false; } foo = foo.parentNode; } document.getElementById(this.id + '-cont').insertAdjacentHTML("beforeEnd", node.toString()); if ((!this.folder) && (!this.openIcon)) { this.icon = webFXTreeConfig.folderIcon; this.openIcon = webFXTreeConfig.openFolderIcon; } this.folder = true; this.indent(); this.expand(); } return node; } WebFXTreeAbstractNode.prototype.toggle = function() { if (this.folder) { if (this.open) { this.collapse(); } else { this.expand(); } } } WebFXTreeAbstractNode.prototype.select = function() { document.getElementById(this.id + '-anchor').focus(); } WebFXTreeAbstractNode.prototype.focus = function() { webFXTreeHandler.selected = this; if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { document.getElementById(this.id + '-icon').src = this.openIcon; } document.getElementById(this.id + '-anchor').style.backgroundColor = 'highlight'; document.getElementById(this.id + '-anchor').style.color = 'highlighttext'; document.getElementById(this.id + '-anchor').focus(); } WebFXTreeAbstractNode.prototype.blur = function() { if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { document.getElementById(this.id + '-icon').src = this.icon; } document.getElementById(this.id + '-anchor').style.backgroundColor = 'transparent'; document.getElementById(this.id + '-anchor').style.color = 'menutext'; } WebFXTreeAbstractNode.prototype.doExpand = function() { if (webFXTreeHandler.behavior == 'classic') { document.getElementById(this.id + '-icon').src = this.openIcon; } if (this.childNodes.length) { document.getElementById(this.id + '-cont').style.display = 'block'; } this.open = true; webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '1'); } WebFXTreeAbstractNode.prototype.doCollapse = function() { if (webFXTreeHandler.behavior == 'classic') { document.getElementById(this.id + '-icon').src = this.icon; } if (this.childNodes.length) { document.getElementById(this.id + '-cont').style.display = 'none'; } this.open = false; webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '0'); } WebFXTreeAbstractNode.prototype.expandAll = function() { this.expandChildren(); if ((this.folder) && (!this.open)) { this.expand(); } } WebFXTreeAbstractNode.prototype.expandChildren = function() { for (var i = 0; i < this.childNodes.length; i++) { this.childNodes[i].expandAll(); } } WebFXTreeAbstractNode.prototype.collapseAll = function() { if ((this.folder) && (this.open)) { this.collapse(); } this.collapseChildren(); } WebFXTreeAbstractNode.prototype.collapseChildren = function() { for (var i = 0; i < this.childNodes.length; i++) { this.childNodes[i].collapseAll(); } } WebFXTreeAbstractNode.prototype.indent = function(lvl, del, last, level) { /* * Since we only want to modify items one level below ourself, * and since the rightmost indentation position is occupied by * the plus icon we set this to -2 */ if (lvl == null) { lvl = -2; } var state = 0; for (var i = this.childNodes.length - 1; i >= 0 ; i--) { state = this.childNodes[i].indent(lvl + 1, del, last, level); if (state) { return; } } if (del) { if (level >= this._level) { if (this.folder) { document.getElementById(this.id + '-plus').src = (this.open)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.lPlusIcon; this.plusIcon = webFXTreeConfig.lPlusIcon; this.minusIcon = webFXTreeConfig.lMinusIcon; } else { document.getElementById(this.id + '-plus').src = webFXTreeConfig.lIcon; } return 1; } } var foo = document.getElementById(this.id + '-indent-' + lvl); if (foo) { if ((del) && (last)) { foo._last = true; } if (foo._last) { foo.src = webFXTreeConfig.blankIcon; } else { foo.src = webFXTreeConfig.iIcon; } } return 0; } /* * WebFXTree class */ function WebFXTree(sText, sAction, sBehavior, sIcon, sOpenIcon) { this.base = WebFXTreeAbstractNode; this.base(sText, sAction); this.icon = sIcon || webFXTreeConfig.rootIcon; this.openIcon = sOpenIcon || webFXTreeConfig.openRootIcon; /* Defaults to open */ this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '0')?false:true; this.folder = true; this.rendered = false; if (!webFXTreeHandler.behavior) { webFXTreeHandler.behavior = sBehavior || webFXTreeConfig.defaultBehavior; } this.targetWindow = ''; } WebFXTree.prototype = new WebFXTreeAbstractNode; WebFXTree.prototype.setBehavior = function (sBehavior) { webFXTreeHandler.behavior = sBehavior; }; WebFXTree.prototype.getBehavior = function (sBehavior) { return webFXTreeHandler.behavior; }; WebFXTree.prototype.getSelected = function() { if (webFXTreeHandler.selected) { return webFXTreeHandler.selected; } else { return null; } } WebFXTree.prototype.remove = function() { } WebFXTree.prototype.expand = function() { this.doExpand(); } WebFXTree.prototype.collapse = function() { this.focus(); this.doCollapse(); } WebFXTree.prototype.getFirst = function() { return null; } WebFXTree.prototype.getLast = function() { return null; } WebFXTree.prototype.getNextSibling = function() { return null; } WebFXTree.prototype.getPreviousSibling = function() { return null; } WebFXTree.prototype.keydown = function(key) { if (key == 39) { this.expand(); return false; } if (key == 37) { this.collapse(); return false; } if ((key == 40) && (this.open)) { this.childNodes[0].select(); return false; } return true; } WebFXTree.prototype.toString = function() { var str = ""; str += "
"; for (var i = 0; i < this.childNodes.length; i++) { str += this.childNodes[i].toString(i, this.childNodes.length); } str += "
"; this.rendered = true; return str; }; /* * WebFXTreeItem class */ function WebFXTreeItem(sText, sAction, eParent, sIcon, sOpenIcon) { this.base = WebFXTreeAbstractNode; this.base(sText, sAction); /* Defaults to close */ this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '1')?true:false; if (eParent) { eParent.add(this); } if (sIcon) { this.icon = sIcon; } if (sOpenIcon) { this.openIcon = sOpenIcon; } } WebFXTreeItem.prototype = new WebFXTreeAbstractNode; WebFXTreeItem.prototype.remove = function() { var parentNode = this.parentNode; var prevSibling = this.getPreviousSibling(true); var nextSibling = this.getNextSibling(true); var folder = this.parentNode.folder; var last = ((nextSibling) && (nextSibling.parentNode) && (nextSibling.parentNode.id == parentNode.id))?false:true; this.getPreviousSibling().focus(); this._remove(); if (parentNode.childNodes.length == 0) { parentNode.folder = false; parentNode.open = false; } if (last) { if (parentNode.id == prevSibling.id) { document.getElementById(parentNode.id + '-icon').src = webFXTreeConfig.fileIcon; } else { } } if ((!prevSibling.parentNode) || (prevSibling.parentNode != parentNode)) { parentNode.indent(null, true, last, this._level); } if (document.getElementById(prevSibling.id + '-plus')) { if (nextSibling) { if ((parentNode == prevSibling) && (parentNode.getNextSibling)) { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.tIcon; } else if (nextSibling.parentNode != prevSibling) { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.lIcon; } } else { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.lIcon; } } } WebFXTreeItem.prototype._remove = function() { for (var i = this.childNodes.length - 1; i >= 0; i--) { this.childNodes[i]._remove(); } for (var i = 0; i < this.parentNode.childNodes.length; i++) { if (this.id == this.parentNode.childNodes[i].id) { for (var j = i; j < this.parentNode.childNodes.length; j++) { this.parentNode.childNodes[i] = this.parentNode.childNodes[i+1] } this.parentNode.childNodes.length = this.parentNode.childNodes.length - 1; if (i + 1 == this.parentNode.childNodes.length) { this.parentNode._last = true; } } } webFXTreeHandler.all[this.id] = null; if (document.getElementById(this.id)) { document.getElementById(this.id).innerHTML = ""; document.getElementById(this.id).removeNode(); } } WebFXTreeItem.prototype.expand = function() { this.doExpand(); document.getElementById(this.id + '-plus').src = this.minusIcon; } WebFXTreeItem.prototype.collapse = function() { this.focus(); this.doCollapse(); document.getElementById(this.id + '-plus').src = this.plusIcon; } WebFXTreeItem.prototype.getFirst = function() { return this.childNodes[0]; } WebFXTreeItem.prototype.getLast = function() { if (this.childNodes[this.childNodes.length - 1].open) { return this.childNodes[this.childNodes.length - 1].getLast(); } else { return this.childNodes[this.childNodes.length - 1]; } } WebFXTreeItem.prototype.getNextSibling = function() { for (var i = 0; i < this.parentNode.childNodes.length; i++) { if (this == this.parentNode.childNodes[i]) { break; } } if (++i == this.parentNode.childNodes.length) { return this.parentNode.getNextSibling(); } else { return this.parentNode.childNodes[i]; } } WebFXTreeItem.prototype.getPreviousSibling = function(b) { for (var i = 0; i < this.parentNode.childNodes.length; i++) { if (this == this.parentNode.childNodes[i]) { break; } } if (i == 0) { return this.parentNode; } else { if ((this.parentNode.childNodes[--i].open) || (b && this.parentNode.childNodes[i].folder)) { return this.parentNode.childNodes[i].getLast(); } else { return this.parentNode.childNodes[i]; } } } WebFXTreeItem.prototype.keydown = function(key) { if ((key == 39) && (this.folder)) { if (!this.open) { this.expand(); return false; } else { this.getFirst().select(); return false; } } else if (key == 37) { if (this.open) { this.collapse(); return false; } else { this.parentNode.select(); return false; } } else if (key == 40) { if (this.open) { this.getFirst().select(); return false; } else { var sib = this.getNextSibling(); if (sib) { sib.select(); return false; } } } else if (key == 38) { this.getPreviousSibling().select(); return false; } return true; } WebFXTreeItem.prototype.toString = function (nItem, nItemCount) { var foo = this.parentNode; var indent = ''; if (nItem + 1 == nItemCount) { this.parentNode._last = true; } var i = 0; while (foo.parentNode) { foo = foo.parentNode; indent = "" + indent; i++; } this._level = i; if (this.childNodes.length) { this.folder = 1; } else { this.open = false; } if ((this.folder) || (webFXTreeHandler.behavior != 'classic')) { if (!this.icon) { this.icon = webFXTreeConfig.folderIcon; } if (!this.openIcon) { this.openIcon = webFXTreeConfig.openFolderIcon; } } else if (!this.icon) { this.icon = webFXTreeConfig.fileIcon; } var label = this.text; label = label.replace('<', '<'); label = label.replace('>', '>'); var str = "
"; str += indent; str += "" str += "" + label + "
"; str += "
"; for (var i = 0; i < this.childNodes.length; i++) { str += this.childNodes[i].toString(i,this.childNodes.length); } str += "
"; this.plusIcon = ((this.parentNode._last)?webFXTreeConfig.lPlusIcon:webFXTreeConfig.tPlusIcon); this.minusIcon = ((this.parentNode._last)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.tMinusIcon); return str; }Net_SmartIRC-1.1.7/docs/HTML/media/lib/tab.webfx.css0000620000175000017500000000277612514342261021321 0ustar ubuntuubuntu/* bright: rgb(234,242,255); normal: rgb(120,172,255); dark: rgb(0,66,174); */ .dynamic-tab-pane-control.tab-pane { position: relative; width: 100%; } .dynamic-tab-pane-control .tab-row .tab { font-family: Verdana, Helvetica, Arial; font-size: 12px; cursor: Default; display: inline; margin: 1px -5px 1px 5px; float: left; padding: 3px 6px 3px 6px; background: rgb(234,242,255); border: 1px solid; border-color: #006600; border-left: 0; border-bottom: 0; border-top: 0; cursor: hand; cursor: pointer; z-index: 1; position: relative; top: 0; } .dynamic-tab-pane-control .tab-row .tab.selected { border: 1px solid #006600; border-bottom: 0; z-index: 3; padding: 2px 6px 5px 6px; margin: 1px -6px -2px 0px; top: -2px; background: white; } .dynamic-tab-pane-control .tab-row .tab a { font-family: Verdana, Helvetica, Arial; font-size: 13px; color: #006600; text-decoration: none; cursor: hand; cursor: pointer; } .dynamic-tab-pane-control .tab-row .hover a { color: #006600; } .dynamic-tab-pane-control .tab-row .tab.selected a { font-weight: bold; } .dynamic-tab-pane-control .tab-page { clear: both; border: 1px solid #006600; background: White; z-index: 2; position: relative; top: -2px; color: Black; font-family: Verdana, Helvetica, Arial; font-size: 13px; padding: 10px; } .dynamic-tab-pane-control .tab-row { z-index: 1; white-space: nowrap; background: rgb(234,242,255); height: 1.85em; width: 100%; } Net_SmartIRC-1.1.7/docs/HTML/media/lib/tabpane.js0000620000175000017500000001557212514342261020675 0ustar ubuntuubuntu/* * Tab Pane * * This script was created by Erik Arvidsson (erik(at)eae.net) * for WebFX (http://webfx.eae.net) * Copyright 2002 * * For usage see license at http://webfx.eae.net/license.html * * Version: 1.0 * Created: 2002-01-?? First working version * Updated: 2002-02-17 Cleaned up for 1.0 public version * * Dependencies: *.css - a css file to define the layout * */ // This function is used to define if the browser supports the needed // features function hasSupport() { if (typeof hasSupport.support != "undefined") return hasSupport.support; var ie55 = /msie 5\.[56789]/i.test( navigator.userAgent ); hasSupport.support = ( typeof document.implementation != "undefined" && document.implementation.hasFeature( "html", "1.0" ) || ie55 ) // IE55 has a serious DOM1 bug... Patch it! if ( ie55 ) { document._getElementsByTagName = document.getElementsByTagName; document.getElementsByTagName = function ( sTagName ) { if ( sTagName == "*" ) return document.all; else return document._getElementsByTagName( sTagName ); }; } return hasSupport.support; } /////////////////////////////////////////////////////////////////////////////////// // The constructor for tab panes // // el : HTMLElement The html element used to represent the tab pane // bUseCookie : Boolean Optional. Default is true. Used to determine whether to us // persistance using cookies or not // function WebFXTabPane( el, bUseCookie ) { if ( !hasSupport() || el == null ) return; this.element = el; this.element.tabPane = this; this.pages = []; this.selectedIndex = null; this.useCookie = bUseCookie != null ? bUseCookie : true; // add class name tag to class name this.element.className = this.classNameTag + " " + this.element.className; // add tab row this.tabRow = document.createElement( "div" ); this.tabRow.className = "tab-row"; el.insertBefore( this.tabRow, el.firstChild ); var tabIndex = 0; if ( this.useCookie ) { tabIndex = Number( WebFXTabPane.getCookie( "webfxtab_" + this.element.id ) ); if ( isNaN( tabIndex ) ) tabIndex = 0; } this.selectedIndex = tabIndex; // loop through child nodes and add them var cs = el.childNodes; var n; for (var i = 0; i < cs.length; i++) { if (cs[i].nodeType == 1 && cs[i].className == "tab-page") { this.addTabPage( cs[i] ); } } } WebFXTabPane.prototype = { classNameTag: "dynamic-tab-pane-control", setSelectedIndex: function ( n ) { if (this.selectedIndex != n) { if (this.selectedIndex != null && this.pages[ this.selectedIndex ] != null ) this.pages[ this.selectedIndex ].hide(); this.selectedIndex = n; this.pages[ this.selectedIndex ].show(); if ( this.useCookie ) WebFXTabPane.setCookie( "webfxtab_" + this.element.id, n ); // session cookie } }, getSelectedIndex: function () { return this.selectedIndex; }, addTabPage: function ( oElement ) { if ( !hasSupport() ) return; if ( oElement.tabPage == this ) // already added return oElement.tabPage; var n = this.pages.length; var tp = this.pages[n] = new WebFXTabPage( oElement, this, n ); tp.tabPane = this; // move the tab out of the box this.tabRow.appendChild( tp.tab ); if ( n == this.selectedIndex ) tp.show(); else tp.hide(); return tp; } }; // Cookie handling WebFXTabPane.setCookie = function ( sName, sValue, nDays ) { var expires = ""; if ( nDays ) { var d = new Date(); d.setTime( d.getTime() + nDays * 24 * 60 * 60 * 1000 ); expires = "; expires=" + d.toGMTString(); } document.cookie = sName + "=" + sValue + expires + "; path=/"; }; WebFXTabPane.getCookie = function (sName) { var re = new RegExp( "(\;|^)[^;]*(" + sName + ")\=([^;]*)(;|$)" ); var res = re.exec( document.cookie ); return res != null ? res[3] : null; }; WebFXTabPane.removeCookie = function ( name ) { setCookie( name, "", -1 ); }; /////////////////////////////////////////////////////////////////////////////////// // The constructor for tab pages. This one should not be used. // Use WebFXTabPage.addTabPage instead // // el : HTMLElement The html element used to represent the tab pane // tabPane : WebFXTabPane The parent tab pane // nindex : Number The index of the page in the parent pane page array // function WebFXTabPage( el, tabPane, nIndex ) { if ( !hasSupport() || el == null ) return; this.element = el; this.element.tabPage = this; this.index = nIndex; var cs = el.childNodes; for (var i = 0; i < cs.length; i++) { if (cs[i].nodeType == 1 && cs[i].className == "tab") { this.tab = cs[i]; break; } } // insert a tag around content to support keyboard navigation var a = document.createElement( "A" ); a.href = "javascript:void 0;"; while ( this.tab.hasChildNodes() ) a.appendChild( this.tab.firstChild ); this.tab.appendChild( a ); // hook up events, using DOM0 var oThis = this; this.tab.onclick = function () { oThis.select(); }; this.tab.onmouseover = function () { WebFXTabPage.tabOver( oThis ); }; this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); }; } WebFXTabPage.prototype = { show: function () { var el = this.tab; var s = el.className + " selected"; s = s.replace(/ +/g, " "); el.className = s; this.element.style.display = "block"; }, hide: function () { var el = this.tab; var s = el.className; s = s.replace(/ selected/g, ""); el.className = s; this.element.style.display = "none"; }, select: function () { this.tabPane.setSelectedIndex( this.index ); } }; WebFXTabPage.tabOver = function ( tabpage ) { var el = tabpage.tab; var s = el.className + " hover"; s = s.replace(/ +/g, " "); el.className = s; }; WebFXTabPage.tabOut = function ( tabpage ) { var el = tabpage.tab; var s = el.className; s = s.replace(/ hover/g, ""); el.className = s; }; // This function initializes all uninitialized tab panes and tab pages function setupAllTabs() { if ( !hasSupport() ) return; var all = document.getElementsByTagName( "*" ); var l = all.length; var tabPaneRe = /tab\-pane/; var tabPageRe = /tab\-page/; var cn, el; var parentTabPane; for ( var i = 0; i < l; i++ ) { el = all[i] cn = el.className; // no className if ( cn == "" ) continue; // uninitiated tab pane if ( tabPaneRe.test( cn ) && !el.tabPane ) new WebFXTabPane( el ); // unitiated tab page wit a valid tab pane parent else if ( tabPageRe.test( cn ) && !el.tabPage && tabPaneRe.test( el.parentNode.className ) ) { el.parentNode.tabPane.addTabPage( el ); } } } // initialization hook up // DOM2 if ( typeof window.addEventListener != "undefined" ) window.addEventListener( "load", setupAllTabs, false ); // IE else if ( typeof window.attachEvent != "undefined" ) window.attachEvent( "onload", setupAllTabs ); else { if ( window.onload != null ) { var oldOnload = window.onload; window.onload = function ( e ) { oldOnload( e ); setupAllTabs(); }; } else window.onload = setupAllTabs; }Net_SmartIRC-1.1.7/docs/HTML/media/lib/ua.js0000620000175000017500000000623312514342261017662 0ustar ubuntuubuntu/* ua.js revision 0.200 2001-12-03 Contributor(s): Bob Clary, Netscape Communications, Copyright 2001 Netscape grants you a royalty free license to use, modify and distribute this software provided that this copyright notice appears on all copies. This software is provided "AS IS," without a warranty of any kind. */ function xbDetectBrowser() { var oldOnError = window.onerror; var element = null; window.onerror = null; // work around bug in xpcdom Mozilla 0.9.1 window.saveNavigator = window.navigator; navigator.OS = ''; navigator.version = parseFloat(navigator.appVersion); navigator.org = ''; navigator.family = ''; var platform; if (typeof(window.navigator.platform) != 'undefined') { platform = window.navigator.platform.toLowerCase(); if (platform.indexOf('win') != -1) navigator.OS = 'win'; else if (platform.indexOf('mac') != -1) navigator.OS = 'mac'; else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1) navigator.OS = 'nix'; } var i = 0; var ua = window.navigator.userAgent.toLowerCase(); if (ua.indexOf('opera') != -1) { i = ua.indexOf('opera'); navigator.family = 'opera'; navigator.org = 'opera'; navigator.version = parseFloat('0' + ua.substr(i+6), 10); } else if ((i = ua.indexOf('msie')) != -1) { navigator.org = 'microsoft'; navigator.version = parseFloat('0' + ua.substr(i+5), 10); if (navigator.version < 4) navigator.family = 'ie3'; else navigator.family = 'ie4' } else if (ua.indexOf('gecko') != -1) { navigator.family = 'gecko'; var rvStart = navigator.userAgent.indexOf('rv:') + 3; var rvEnd = navigator.userAgent.indexOf(')', rvStart); var rv = navigator.userAgent.substring(rvStart, rvEnd); var decIndex = rv.indexOf('.'); if (decIndex != -1) { rv = rv.replace(/\./g, '') rv = rv.substring(0, decIndex-1) + '.' + rv.substr(decIndex) } navigator.version = parseFloat(rv); if (ua.indexOf('netscape') != -1) navigator.org = 'netscape'; else if (ua.indexOf('compuserve') != -1) navigator.org = 'compuserve'; else navigator.org = 'mozilla'; } else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1)) { var is_major = parseFloat(navigator.appVersion); if (is_major < 4) navigator.version = is_major; else { i = ua.lastIndexOf('/') navigator.version = parseFloat('0' + ua.substr(i+1), 10); } navigator.org = 'netscape'; navigator.family = 'nn' + parseInt(navigator.appVersion); } else if ((i = ua.indexOf('aol')) != -1 ) { // aol navigator.family = 'aol'; navigator.org = 'aol'; navigator.version = parseFloat('0' + ua.substr(i+4), 10); } else if ((i = ua.indexOf('hotjava')) != -1 ) { // hotjava navigator.family = 'hotjava'; navigator.org = 'sun'; navigator.version = parseFloat(navigator.appVersion); } window.onerror = oldOnError; } xbDetectBrowser(); Net_SmartIRC-1.1.7/docs/HTML/media/background.png0000620000175000017500000000035612514342261020776 0ustar ubuntuubuntu‰PNG  IHDRЩИщЦ+tEXtCreation Timewo 27 nov 2002 16:02:37 +0100œ™щtIMEв $˜$ pHYs  вн~ќgAMAБ ќaPLTE№№№™™™Ѕ5р4IDATxкэвС @AэПщ+С—x„™ ВЊ}=@Ip џЩy—˜хМK ЬrоЅ„Es@ ’ 5IENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/empty.png0000620000175000017500000000031612514342261020011 0ustar ubuntuubuntu‰PNG  IHDR(Ы4Л+tEXtCreation Timewo 27 nov 2002 16:17:33 +0100Oqй€tIMEв )yн J pHYs  вн~ќgAMAБ ќaPLTEџџџЇФШtRNS@циf IDATxкc`х'оќIENDЎB`‚Net_SmartIRC-1.1.7/docs/HTML/media/style.css0000620000175000017500000001342612514342261020025 0ustar ubuntuubuntua { color:#000000; text-decoration: none; } a:visited { color:#000000; text-decoration: none; } a:active { color:#000000; text-decoration: none; } a:hover { color:#000000; text-decoration: underline; } a.green { color:#006600; text-decoration: none; } a.green:visited { color:#006600; text-decoration: none; } a.green:active { color:#006600; text-decoration: none; } a.green:hover { color:#006600; text-decoration: underline; } a.upperright { font-size: 11px; color:#000000; font-weight: bold; text-decoration: none; } a.upperright:visited { font-size: 11px; color:#000000; font-weight: bold; text-decoration: none; } a.upperright:active { font-size: 11px; color:#000000; font-weight: bold; text-decoration: none; } a.upperright:hover { font-size: 11px; color:#000000; font-weight: bold; text-decoration: none; } .upperright { font-size: 11px; color:#000000; font-weight: bold; } a.menu { color:#ffffff; text-decoration: none; } a.menu:visited { color:#ffffff; text-decoration: none; } a.menu:active { color:#ffffff; text-decoration: none; } a.menu:hover { color:#ffffff; text-decoration: underline; } body { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; margin: 0; padding: 0; background-color: #ffffff; color: #000000; } td, th { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } p { font-family: verdana,arial,helvetica,sans-serif; } .menu { font-size: 8pt; color: #ffffff; } ul li { margin: 0.2em 0em 0.2em 0em; padding: 0em; list-style-position: outside; list-style-type: square; font-size: 8pt; } span.li { color: #000000; } ul { /* color: #014fbe; */ color: #006600; margin: 3px 0em 3px 16px; } th.pack { color: #FFFFFF; background: #009933; text-align: right; } td.package_info_title { color: #006600; font-weight: bold; } th.others { color: #006600; text-align: left; } em { font-weight: bold; font-style: italic; } span.green { color: #006600; } span.headline { font-family: verdana,arial,helvetica,sans-serif; font-size: 125%; font-weight: bold; color: #ffffff; } span.title { font-family: verdana,arial,helvetica,sans-serif; font-size: 110%; font-weight: bold; color: #006600; } .newsDate { font-size: 85%; font-style: italic; color: #66cc66; } .compact { font-family: arial, helvetica, sans-serif; font-size: 90%; } .menuWhite { font-family: verdana,arial,helvetica,sans-serif; font-size: 75%; color: #ffffff; } .menuBlack { font-family: verdana,arial,helvetica,sans-serif; text-decoration: none; font-weight: bold; font-size: 75%; color: #000000; } .sidebar { font-size: 85%; } code, pre, tt { font-family: Courier, "Courier New", monospace; font-size: 90%; } pre.php { border-color: black; border-style: dashed; border-width: 1px; background-color: #eeeeee; padding: 5px; } h1 { font-family: verdana,arial,helvetica,sans-serif; font-size: 140%; font-weight: bold; color: #006600; } h2 { font-family: verdana,arial,helvetica,sans-serif; font-size: 125%; font-weight: bold; color: #006600; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 110%; font-weight: bold; color: #006600; } small { font-family: verdana,arial,helvetica,sans-serif; font-size: 75%; } a.small { font-family: verdana,arial,helvetica,sans-serif; font-size: 75%; text-decoration: none; } .tableTitle { font-family: verdana,arial,helvetica,sans-serif; font-weight: bold; } .tableExtras { font-family: verdana,arial,helvetica,sans-serif; font-size: 85%; color: #FFFFFF; } input { font-family: verdana,arial,helvetica,sans-serif; } textarea { font-family: verdana,arial,helvetica,sans-serif; } input.small, select.small { font-family: verdana,arial,helvetica,sans-serif; font-size: 75%; } textarea.small { font-family: verdana,arial,helvetica,sans-serif; font-size: 75%; } form { margin-bottom : 0; } a { color: #006600; background-color: transparent; text-decoration: none; } a:hover { text-decoration: underline; } a.menu { color: #ffffff; background-color: transparent; } td { font-size: 10pt; } td.header_top { color: #ffffff; background-color: #9999cc; font-size: 16pt; font-weight: bold; text-align: right; padding: 10px; } td.header_line { color: #ffffff; background-color: #333366; } td.header_menu { color: #ffffff; background-color: #666699; font-size: 8pt; text-align: right; padding: 2px; padding-right: 5px; } td.menu { padding: 2px; padding-left: 5px; } td.code_border { color: #000000; background-color: #c0c0c0; } td.code { color: #000000; background-color: #f0f0f0; } .type { font-style: italic; } div.credit { font-size: 8pt; text-align: center; } div.package { padding-left: 5px; } div.tags { padding-left: 15px; } div.function { padding-left: 15px; } div.top { font-size: 8pt; } div.warning { color: #ff0000; background-color: transparent; } div.description { padding-left: 15px; } hr { height: 1px; border-style: solid; border-color: #c0c0c0; margin-top: 10px; margin-bottom: 10px; } span.smalllinenumber { font-size: 8pt; }Net_SmartIRC-1.1.7/docs/HTML/media/TreeMenu.js0000620000175000017500000005027112514342261020234 0ustar ubuntuubuntu// +-----------------------------------------------------------------------+ // | Copyright (c) 2002, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | o Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | o Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution.| // | o The names of the authors may not be used to endorse or promote | // | products derived from this software without specific prior written | // | permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ // | Author: Richard Heyes | // | Harald Radi | // +-----------------------------------------------------------------------+ // // $Id: TreeMenu.js,v 1.1 2003-07-23 18:08:55 meebey Exp $ /** * TreeMenu class */ function TreeMenu(iconpath, myname, linkTarget, defaultClass, usePersistence, noTopLevelImages) { // Properties this.iconpath = iconpath; this.myname = myname; this.linkTarget = linkTarget; this.defaultClass = defaultClass; this.usePersistence = usePersistence; this.noTopLevelImages = noTopLevelImages; this.n = new Array(); this.nodeRefs = new Array(); this.branches = new Array(); this.branchStatus = new Array(); this.layerRelations = new Array(); this.childParents = new Array(); this.cookieStatuses = new Array(); this.preloadImages(); } /** * Adds a node to the tree */ TreeMenu.prototype.addItem = function (newNode) { newIndex = this.n.length; this.n[newIndex] = newNode; return this.n[newIndex]; } /** * Preload images hack for Mozilla */ TreeMenu.prototype.preloadImages = function () { var plustop = new Image; plustop.src = this.iconpath + '/plustop.gif'; var plusbottom = new Image; plusbottom.src = this.iconpath + '/plusbottom.gif'; var plus = new Image; plus.src = this.iconpath + '/plus.gif'; var minustop = new Image; minustop.src = this.iconpath + '/minustop.gif'; var minusbottom = new Image; minusbottom.src = this.iconpath + '/minusbottom.gif'; var minus = new Image; minus.src = this.iconpath + '/minus.gif'; var branchtop = new Image; branchtop.src = this.iconpath + '/branchtop.gif'; var branchbottom = new Image; branchbottom.src = this.iconpath + '/branchbottom.gif'; var branch = new Image; branch.src = this.iconpath + '/branch.gif'; var linebottom = new Image; linebottom.src = this.iconpath + '/linebottom.gif'; var line = new Image; line.src = this.iconpath + '/line.gif'; } /** * Main function that draws the menu and assigns it * to the layer (or document.write()s it) */ TreeMenu.prototype.drawMenu = function ()// OPTIONAL ARGS: nodes = [], level = [], prepend = '', expanded = false, visbility = 'inline', parentLayerID = null { /** * Necessary variables */ var output = ''; var modifier = ''; var layerID = ''; var parentLayerID = ''; /** * Parse any optional arguments */ var nodes = arguments[0] ? arguments[0] : this.n var level = arguments[1] ? arguments[1] : []; var prepend = arguments[2] ? arguments[2] : ''; var expanded = arguments[3] ? arguments[3] : false; var visibility = arguments[4] ? arguments[4] : 'inline'; var parentLayerID = arguments[5] ? arguments[5] : null; var currentlevel = level.length; for (var i=0; i 1 ? "top" : 'single'; } else if(i == (nodes.length-1)) { modifier = "bottom"; } else { modifier = ""; } /** * Single root branch is always expanded */ if (!this.doesMenu() || (parentLayerID == null && (nodes.length == 1 || this.noTopLevelImages))) { expanded = true; } else if (nodes[i].expanded) { expanded = true; } else { expanded = false; } /** * Make sure visibility is correct based on parent status */ visibility = this.checkParentVisibility(layerID) ? visibility : 'none'; /** * Setup branch status and build an indexed array * of branch layer ids */ if (nodes[i].n.length > 0) { this.branchStatus[layerID] = expanded; this.branches[this.branches.length] = layerID; } /** * Setup toggle relationship */ if (!this.layerRelations[parentLayerID]) { this.layerRelations[parentLayerID] = new Array(); } this.layerRelations[parentLayerID][this.layerRelations[parentLayerID].length] = layerID; /** * Branch images */ var gifname = nodes[i].n.length && this.doesMenu() && nodes[i].isDynamic ? (expanded ? 'minus' : 'plus') : 'branch'; var iconimg = nodes[i].icon ? this.stringFormat('', this.iconpath, nodes[i].icon) : ''; /** * Add event handlers */ var eventHandlers = ""; for (j in nodes[i].events) { eventHandlers += this.stringFormat('{0}="{1}" ', j, nodes[i].events[j]); } /** * Build the html to write to the document * IMPORTANT: * document.write()ing the string: '
', layerID, visibility, (nodes[i].cssClass ? nodes[i].cssClass : this.defaultClass)) : this.stringFormat('
', ''); var onMDown = this.doesMenu() && nodes[i].n.length && nodes[i].isDynamic ? this.stringFormat('onmousedown="{0}.toggleBranch(\'{1}\', true)" style="cursor: pointer; cursor: hand"', this.myname, layerID) : ''; var imgTag = this.stringFormat('', this.iconpath, gifname, modifier, layerID, onMDown); var linkStart = nodes[i].link ? this.stringFormat('', nodes[i].link, this.linkTarget) : ''; var linkEnd = nodes[i].link ? '' : ''; output = this.stringFormat('{0}{1}{2}{3}{4}{6}{7}
', layerTag, prepend, parentLayerID == null && (nodes.length == 1 || this.noTopLevelImages) ? '' : imgTag, iconimg, linkStart, eventHandlers, nodes[i].title, linkEnd); /** * Write out the HTML. Uses document.write for speed over layers and * innerHTML. This however means no dynamic adding/removing nodes on * the client side. This could be conditional I guess if dynamic * adding/removing is required. */ document.write(output + "\r\n"); /** * Traverse sub nodes ? */ if (nodes[i].n.length) { /** * Determine what to prepend. If there is only one root * node then the prepend to pass to children is nothing. * Otherwise it depends on where we are in the tree. */ if (parentLayerID == null && (nodes.length == 1 || this.noTopLevelImages)) { var newPrepend = ''; } else if (i < (nodes.length - 1)) { var newPrepend = prepend + this.stringFormat('', this.iconpath); } else { var newPrepend = prepend + this.stringFormat('', this.iconpath); } this.drawMenu(nodes[i].n, level, newPrepend, nodes[i].expanded, expanded ? 'inline' : 'none', layerID); } } } /** * Toggles a branches visible status. Called from resetBranches() * and also when a +/- graphic is clicked. */ TreeMenu.prototype.toggleBranch = function (layerID, updateStatus) // OPTIONAL ARGS: fireEvents = true { var currentDisplay = this.getLayer(layerID).style.display; var newDisplay = (this.branchStatus[layerID] && currentDisplay == 'inline') ? 'none' : 'inline'; var fireEvents = arguments[2] != null ? arguments[2] : true; for (var i=0; i= 5)); var is_gecko = (agt.indexOf('gecko') != -1); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); //--> end hide JavaScript Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/mybot.html0000620000175000017500000006130012514342261021340 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class mybot



  • Package: - Net_SmartIRC

Class Methods

channel_test (line 32)
void channel_test ( &$irc, &$data )

[ Top ]

query_test (line 37)
void query_test ( &$irc, &$data )

[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC.html0000620000175000017500000011351112514342261022442 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC
Net_SmartIRC_base
   |
   --Net_SmartIRC_irccommands
      |
      --Net_SmartIRC_messagehandler
         |
         --Net_SmartIRC

$Id$



Inherited Variables

Inherited Methods

Class: Net_SmartIRC_messagehandler

_event_error
_event_err_nicknameinuse
_event_join
_event_kick
_event_mode
_event_nick
_event_part
_event_ping
_event_privmsg
_event_quit
_event_rpl_banlist
_event_rpl_channelmodeis
_event_rpl_endofmotd
_event_rpl_motd
_event_rpl_motdstart
_event_rpl_namreply
_event_rpl_topic
_event_rpl_umodeis
_event_rpl_welcome
_event_rpl_whoreply
_event_topic

Class: Net_SmartIRC_irccommands

ban - bans a hostmask for the given channel or requests the current banlist
changeNick - changes the own nickname
channel - returns an object reference to the specified channel
deop - deops an user in the given channel
devoice - devoice a user in the given channel
getList - gets a list of one ore more channels
getTopic - gets the topic of a channel
invite - invites a user to the specified channel
join - Joins one or more IRC channels with an optional key.
kick - Kicks one or more user from an IRC channel with an optional reason.
message - sends a new message
mode - sets or gets the mode of an user or channel
names - requests all nicknames of one or more channels
op - ops an user in the given channel
part - parts from one or more IRC channels with an optional reason
quit - sends QUIT to IRC server and disconnects
setTopic - sets a new topic of a channel
unban - unbans a hostmask on the given channel
voice - voice a user in the given channel
who - requests a 'WHO' from the specified target
whois - requests a 'WHOIS' from the specified target
whowas - requests a 'WHOWAS' from the specified target (if he left the IRC network)

Class: Net_SmartIRC_base

connect - Creates the sockets and connects to the IRC server on the given port.
disconnect - Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
getMotd - Returns the full motd.
getUsermode - Returns the usermode.
isBanned - Checks if the hostmask is on the specified channel banned and returns the result.
isError
isJoined - checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
isOpped - Checks if we or the given user is opped on the specified channel and returns the result.
isVoiced - Checks if we or the given user is voiced on the specified channel and returns the result.
listen - goes into receive mode
listenFor - waits for a special message type and puts the answer in $result
log - Adds an entry to the log.
login - login and register nickname on the IRC network
Net_SmartIRC - Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
reconnect - Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler - registers a new actionhandler and returns the assigned id
registerTimehandler - registers a timehandler and returns the assigned id
setAutoReconnect - Enables/disables autoreconnecting.
setAutoRetry - Enables/disables autoretry for connecting to a server.
setBenchmark - Enables/disables the benchmark engine.
setChannelSynching - Deprecated, use setChannelSyncing() instead!
setChannelSyncing - Enables/disables channel syncing.
setCtcpVersion - Sets the CTCP version reply string.
setDebug - Sets the level of debug messages.
setDisconnecttime - Sets the delaytime before closing the socket when disconnect.
setLogdestination - Sets the destination of all log messages.
setLogfile - Sets the file for the log if the destination is set to file.
setReceivedelay - Sets the delay for receiving data from the IRC server.
setReceiveTimeout - Sets the receive timeout.
setSenddelay - Sets the delay for sending data to the IRC server.
setTransmitTimeout - Sets the transmit timeout.
setUseSockets - Enables/disables the usage of real sockets.
showBenchmark - Shows the benchmark result.
startBenchmark - Starts the benchmark (sets the counters).
stopBenchmark - Stops the benchmark and displays the result.
throwError
unregisterActionhandler - unregisters an existing actionhandler
unregisterActionid - unregisters an existing actionhandler via the id
unregisterTimeid - unregisters an existing timehandler via the id

Documentation generated on Wed, 23 Jul 2003 19:59:11 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_actionhandler.html0000620000175000017500000006777012514342261025354 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_actionhandler



  • Package: - Net_SmartIRC

Class Variables

$id (line 2280)
Data type: integer

Tags:
  • Access: - public
[ Top ]


$message (line 2292)
Data type: string

Tags:
  • Access: - public
[ Top ]


$method (line 2304)
Data type: string

Tags:
  • Access: - public
[ Top ]


$object (line 2298)
Data type: object

Tags:
  • Access: - public
[ Top ]


$type (line 2286)
Data type: integer

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:12 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_base.html0000620000175000017500000027212412514342261023442 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_base

main SmartIRC class



Child classes:
Net_SmartIRC_irccommands
main SmartIRC class

Class Variables

$channel (line 331)
Data type: array

Description:
Stores all channels in this array where we are joined, works only if channelsyncing is activated.

Eg. for accessing a user, use it like this: (in this example the SmartIRC object is stored in $irc) $irc->channel['#test']->users['meebey']->nick;


Tags:
[ Top ]


$nreplycodes (line 318)
Data type: array

Description:
All numeric IRC replycodes, the index is the numeric replycode.

Tags:
  • Access: - public
  • See: - $SMARTIRC_nreplycodes
[ Top ]


$replycodes (line 309)
Data type: array

Description:
All IRC replycodes, the index is the replycode name.

Tags:
  • Access: - public
  • See: - $SMARTIRC_replycodes
[ Top ]




Class Methods

connect (line 822)
void connect ( $address, $port )

Parameters:
  •  
string   $address  
  •  
integer   $port  

Description:
Creates the sockets and connects to the IRC server on the given port.

Tags:
  • Access: - public
[ Top ]

disconnect (line 890)
boolean disconnect ( [$quickdisconnect = false] )

Parameters:
  •  
boolean   $quickdisconnect   default: false

Description:
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


Tags:
  • Access: - public
[ Top ]

getMotd (line 798)
array getMotd ( )

Description:
Returns the full motd.

Tags:
  • Access: - public
[ Top ]

getUsermode (line 809)
string getUsermode ( )

Description:
Returns the usermode.

Tags:
  • Access: - public
[ Top ]

isBanned (line 1108)
boolean isBanned ( $channel, $hostmask )

Parameters:
  •  
string   $channel  
  •  
string   $hostmask  

Description:
Checks if the hostmask is on the specified channel banned and returns the result.

ChannelSyncing is required for this.


Tags:
[ Top ]

isError (line 2191)
void isError ( $object )

[ Top ]

isJoined (line 1020)
boolean isJoined ( $channel, [$nickname = null] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  

Description:
checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.

Tags:
[ Top ]

isOpped (line 1048)
boolean isOpped ( $channel, [$nickname = null] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  

Description:
Checks if we or the given user is opped on the specified channel and returns the result.

ChannelSyncing is required for this.


Tags:
[ Top ]

isVoiced (line 1078)
boolean isVoiced ( $channel, [$nickname = null] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  

Description:
Checks if we or the given user is voiced on the specified channel and returns the result.

ChannelSyncing is required for this.


Tags:
[ Top ]

listen (line 1135)
boolean listen ( )

Description:
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!


Tags:
  • Access: - public
[ Top ]

listenFor (line 1156)
array listenFor ( $messagetype )

Parameters:
  •  
integer   $messagetype   see in the documentation 'Message Types'

Description:
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.


Tags:
  • Return: - answer from the IRC server for this $messagetype
  • Access: - public
[ Top ]

log (line 735)
void log ( $level, $entry, [$file = null], [$line = null] )

Parameters:
  •  
integer   $level   bit constants (SMARTIRC_DEBUG_*)
  •  
string   $entry   the new log entry

Description:
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


Tags:
[ Top ]

login (line 981)
void login ( $nick, $realname, [$usermode = 0], [$username = null], [$password = null] )

Parameters:
  •  
string   $nick  
  •  
string   $realname  
  •  
integer   $usermode  
  •  
string   $username  
  •  
string   $password  

Description:
login and register nickname on the IRC network

Registers the nickname and user information on the IRC network.


Tags:
  • Access: - public
[ Top ]

Net_SmartIRC (line 340)
void Net_SmartIRC ( )

Description:
Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.

Tags:
  • Access: - public
[ Top ]

reconnect (line 940)
void reconnect ( )

Description:
Reconnects to the IRC server with the same login info, it also rejoins the channels

Tags:
  • Access: - public
[ Top ]

registerActionhandler (line 1184)
integer registerActionhandler ( $handlertype, $regexhandler, &$object, $methodname )

Parameters:
  •  
integer   $handlertype   bits constants, see in this documentation Message Types
  •  
string   $regexhandler   the message that has to be in the IRC message in regex syntax
  •  
object   $object   a reference to the objects of the method
  •  
string   $methodname   the methodname that will be called when the handler happens

Description:
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.


Tags:
  • Return: - assigned actionhandler id
  • Access: - public
  • See: - example.php
[ Top ]

registerTimehandler (line 1292)
integer registerTimehandler ( $interval, &$object, $methodname )

Parameters:
  •  
integer   $interval   interval time in milliseconds
  •  
object   $object   a reference to the objects of the method
  •  
string   $methodname   the methodname that will be called when the handler happens

Description:
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.


Tags:
  • Return: - assigned timehandler id
  • Access: - public
  • See: - example7.php
[ Top ]

setAutoReconnect (line 608)
void setAutoReconnect ( $boolean )

Parameters:
  •  
boolean   $boolean  

Description:
Enables/disables autoreconnecting.

Tags:
  • Access: - public
[ Top ]

setAutoRetry (line 624)
void setAutoRetry ( $boolean )

Parameters:
  •  
boolean   $boolean  

Description:
Enables/disables autoretry for connecting to a server.

Tags:
  • Access: - public
[ Top ]

setBenchmark (line 439)
void setBenchmark ( $boolean )

Parameters:
  •  
boolean   $boolean  

Description:
Enables/disables the benchmark engine.

Tags:
  • Access: - public
[ Top ]

setChannelSynching (line 456)
void setChannelSynching ( $boolean )

Parameters:
  •  
boolean   $boolean  

Description:
Deprecated, use setChannelSyncing() instead!

Tags:
  • Access: - public
  • Deprecated: - 
[ Top ]

setChannelSyncing (line 472)
void setChannelSyncing ( $boolean )

Parameters:
  •  
boolean   $boolean  

Description:
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.


Tags:
  • Access: - public
[ Top ]

setCtcpVersion (line 494)
void setCtcpVersion ( $versionstring )

Parameters:
  •  
string   $versionstring  

Description:
Sets the CTCP version reply string.

Tags:
  • Access: - public
[ Top ]

setDebug (line 427)
void setDebug ( $level )

Parameters:
  •  
integer   $level  

Description:
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


Tags:
[ Top ]

setDisconnecttime (line 552)
void setDisconnecttime ( $milliseconds )

Parameters:
  •  
integer   $milliseconds  

Description:
Sets the delaytime before closing the socket when disconnect.

Tags:
  • Access: - public
[ Top ]

setLogdestination (line 514)
void setLogdestination ( $type )

Parameters:
  •  
integer   $type   must be on of the constants

Description:
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


Tags:
[ Top ]

setLogfile (line 540)
void setLogfile ( $file )

Parameters:
  •  
string   $file  

Description:
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!


Tags:
  • Access: - public
[ Top ]

setReceivedelay (line 572)
void setReceivedelay ( $milliseconds )

Parameters:
  •  
integer   $milliseconds  

Description:
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


Tags:
  • Access: - public
[ Top ]

setReceiveTimeout (line 643)
void setReceiveTimeout ( $seconds )

Parameters:
  •  
integer   $seconds  

Description:
Sets the receive timeout.

If the timeout occurs, the connection will be reinitialized Default: 300 seconds


Tags:
  • Access: - public
[ Top ]

setSenddelay (line 592)
void setSenddelay ( $milliseconds )

Parameters:
  •  
integer   $milliseconds  

Description:
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


Tags:
  • Access: - public
[ Top ]

setTransmitTimeout (line 662)
void setTransmitTimeout ( $seconds )

Parameters:
  •  
integer   $seconds  

Description:
Sets the transmit timeout.

If the timeout occurs, the connection will be reinitialized Default: 300 seconds


Tags:
  • Access: - public
[ Top ]

setUseSockets (line 378)
void setUseSockets ( $boolean )

Parameters:
  •  
bool   $boolean  

Description:
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


Tags:
  • Access: - public
[ Top ]

showBenchmark (line 705)
void showBenchmark ( )

Description:
Shows the benchmark result.

Tags:
  • Access: - public
[ Top ]

startBenchmark (line 677)
void startBenchmark ( )

Description:
Starts the benchmark (sets the counters).

Tags:
  • Access: - public
[ Top ]

stopBenchmark (line 689)
void stopBenchmark ( )

Description:
Stops the benchmark and displays the result.

Tags:
  • Access: - public
[ Top ]

throwError (line 2195)
void &throwError ( $message )

[ Top ]

unregisterActionhandler (line 1216)
boolean unregisterActionhandler ( $handlertype, $regexhandler, &$object, $methodname )

Parameters:
  •  
integer   $handlertype  
  •  
string   $regexhandler  
  •  
object   $object  
  •  
string   $methodname  

Description:
unregisters an existing actionhandler

Tags:
  • Access: - public
[ Top ]

unregisterActionid (line 1257)
boolean unregisterActionid ( $id )

Parameters:
  •  
integer   $id  

Description:
unregisters an existing actionhandler via the id

Tags:
  • Access: - public
[ Top ]

unregisterTimeid (line 1321)
boolean unregisterTimeid ( $id )

Parameters:
  •  
integer   $id  

Description:
unregisters an existing timehandler via the id

Tags:
[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:12 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_channel.html0000620000175000017500000007563012514342261024143 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_channel



  • Package: - Net_SmartIRC

Class Variables

$bans (line 2382)
Data type: array

Tags:
  • Access: - public
[ Top ]


$key (line 2358)
Data type: string

Tags:
  • Access: - public
[ Top ]


$mode (line 2394)
Data type: string

Tags:
  • Access: - public
[ Top ]


$name (line 2352)
Data type: string

Tags:
  • Access: - public
[ Top ]


$ops (line 2370)
Data type: array

Tags:
  • Access: - public
[ Top ]


$topic (line 2388)
Data type: string

Tags:
  • Access: - public
[ Top ]


$users (line 2364)
Data type: array

Tags:
  • Access: - public
[ Top ]


$voices (line 2376)
Data type: array

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_channeluser.html0000620000175000017500000006542412514342261025042 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_channeluser
Net_SmartIRC_user
   |
   --Net_SmartIRC_channeluser



  • Package: - Net_SmartIRC

Inherited Variables

Class Variables

$op (line 2460)
Data type: boolean

Tags:
  • Access: - public
[ Top ]


$voice (line 2466)
Data type: boolean

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_data.html0000620000175000017500000010176512514342261023443 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_data



  • Package: - Net_SmartIRC

Class Variables

$channel (line 2238)
Data type: string

Tags:
  • Access: - public
[ Top ]


$from (line 2214)
Data type: string

Tags:
  • Access: - public
[ Top ]


$host (line 2232)
Data type: string

Tags:
  • Access: - public
[ Top ]


$ident (line 2226)
Data type: string

Tags:
  • Access: - public
[ Top ]


$message (line 2244)
Data type: string

Tags:
  • Access: - public
[ Top ]


$messageex (line 2250)
Data type: array

Tags:
  • Access: - public
[ Top ]


$nick (line 2220)
Data type: string

Tags:
  • Access: - public
[ Top ]


$rawmessage (line 2262)
Data type: string

Tags:
  • Access: - public
[ Top ]


$rawmessageex (line 2268)
Data type: array

Tags:
  • Access: - public
[ Top ]


$type (line 2256)
Data type: integer

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_Error.html0000620000175000017500000006376112514342261023626 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_Error



  • Package: - Net_SmartIRC

Class Variables

$error_msg (line 2509)
Data type: mixed

[ Top ]




Class Methods

Net_SmartIRC_Error (line 2511)
void constructor Net_SmartIRC_Error ( $message )

[ Top ]

getMessage (line 2516)
void getMessage ( )

[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_irccommands.html0000620000175000017500000022762512514342261025035 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_irccommands
Net_SmartIRC_base
   |
   --Net_SmartIRC_irccommands

$Id$



Child classes:

Inherited Variables

Inherited Methods

Class: Net_SmartIRC_base

connect - Creates the sockets and connects to the IRC server on the given port.
disconnect - Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
getMotd - Returns the full motd.
getUsermode - Returns the usermode.
isBanned - Checks if the hostmask is on the specified channel banned and returns the result.
isError
isJoined - checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
isOpped - Checks if we or the given user is opped on the specified channel and returns the result.
isVoiced - Checks if we or the given user is voiced on the specified channel and returns the result.
listen - goes into receive mode
listenFor - waits for a special message type and puts the answer in $result
log - Adds an entry to the log.
login - login and register nickname on the IRC network
Net_SmartIRC - Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
reconnect - Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler - registers a new actionhandler and returns the assigned id
registerTimehandler - registers a timehandler and returns the assigned id
setAutoReconnect - Enables/disables autoreconnecting.
setAutoRetry - Enables/disables autoretry for connecting to a server.
setBenchmark - Enables/disables the benchmark engine.
setChannelSynching - Deprecated, use setChannelSyncing() instead!
setChannelSyncing - Enables/disables channel syncing.
setCtcpVersion - Sets the CTCP version reply string.
setDebug - Sets the level of debug messages.
setDisconnecttime - Sets the delaytime before closing the socket when disconnect.
setLogdestination - Sets the destination of all log messages.
setLogfile - Sets the file for the log if the destination is set to file.
setReceivedelay - Sets the delay for receiving data from the IRC server.
setReceiveTimeout - Sets the receive timeout.
setSenddelay - Sets the delay for sending data to the IRC server.
setTransmitTimeout - Sets the transmit timeout.
setUseSockets - Enables/disables the usage of real sockets.
showBenchmark - Shows the benchmark result.
startBenchmark - Starts the benchmark (sets the counters).
stopBenchmark - Stops the benchmark and displays the result.
throwError
unregisterActionhandler - unregisters an existing actionhandler
unregisterActionid - unregisters an existing actionhandler via the id
unregisterTimeid - unregisters an existing timehandler via the id

Class Methods

ban (line 323)
void ban ( $channel, [$hostmask = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $hostmask  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
bans a hostmask for the given channel or requests the current banlist

The banlist will be requested if no hostmask is specified


Tags:
  • Access: - public
[ Top ]

changeNick (line 370)
void changeNick ( $newnick, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $newnick  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
changes the own nickname

Trys to set a new nickname, nickcollisions are handled.


Tags:
  • Access: - public
[ Top ]

channel (line 77)
object &channel ( $channelname )

Parameters:
  •  
string   $channelname  

Description:
returns an object reference to the specified channel

If the channel does not exist (because not joint) false will be returned.


Tags:
  • Return: - reference to the channel object
  • Access: - public
[ Top ]

deop (line 279)
void deop ( $channel, $nickname, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
deops an user in the given channel

Tags:
  • Access: - public
[ Top ]

devoice (line 307)
void devoice ( $channel, $nickname, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
devoice a user in the given channel

Tags:
  • Access: - public
[ Top ]

getList (line 171)
void getList ( [$channelarray = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
mixed   $channelarray  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
gets a list of one ore more channels

Requests a full channellist if $channelarray is not given. (use it with care, usualy its a looooong list)


Tags:
  • Access: - public
[ Top ]

getTopic (line 231)
void getTopic ( $channel, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
gets the topic of a channel

Tags:
  • Access: - public
[ Top ]

invite (line 355)
void invite ( $nickname, $channel, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $nickname  
  •  
string   $channel  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
invites a user to the specified channel

Tags:
  • Access: - public
[ Top ]

join (line 96)
void join ( $channelarray, [$key = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
mixed   $channelarray  
  •  
string   $key  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
Joins one or more IRC channels with an optional key.

Tags:
  • Access: - public
[ Top ]

kick (line 145)
void kick ( $channel, $nicknamearray, [$reason = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
mixed   $nicknamearray  
  •  
string   $reason  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
Kicks one or more user from an IRC channel with an optional reason.

Tags:
  • Access: - public
[ Top ]

message (line 41)
boolean message ( $type, $destination, $message, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
integer   $type   specifies the type, like QUERY/ACTION or CTCP see 'Message Types'
  •  
string   $destination   can be a user or channel
  •  
string   $message   the message

Description:
sends a new message

Sends a message to a channel or user.


Tags:
  • Access: - public
  • See: - DOCUMENTATION
[ Top ]

mode (line 247)
void mode ( $target, [$newmode = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $target   the target, can be an user (only yourself) or a channel
  •  
string   $newmode   the new mode like +mt
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
sets or gets the mode of an user or channel

Changes/requests the mode of the given target.


Tags:
  • Access: - public
[ Top ]

names (line 195)
void names ( [$channelarray = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
mixed   $channelarray  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
requests all nicknames of one or more channels

The requested nickname list also includes op and voice state


Tags:
  • Access: - public
[ Top ]

op (line 265)
void op ( $channel, $nickname, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
ops an user in the given channel

Tags:
  • Access: - public
[ Top ]

part (line 120)
void part ( $channelarray, [$reason = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
mixed   $channelarray  
  •  
string   $reason  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
parts from one or more IRC channels with an optional reason

Tags:
  • Access: - public
[ Top ]

quit (line 423)
void quit ( [$quitmessage = null], [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $quitmessage   optional quitmessage
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
sends QUIT to IRC server and disconnects

Tags:
  • Access: - public
[ Top ]

setTopic (line 218)
void setTopic ( $channel, $newtopic, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $newtopic  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
sets a new topic of a channel

Tags:
  • Access: - public
[ Top ]

unban (line 341)
void unban ( $channel, $hostmask, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $hostmask  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
unbans a hostmask on the given channel

Tags:
  • Access: - public
[ Top ]

voice (line 293)
void voice ( $channel, $nickname, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $channel  
  •  
string   $nickname  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
voice a user in the given channel

Tags:
  • Access: - public
[ Top ]

who (line 383)
void who ( $target, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $target  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
requests a 'WHO' from the specified target

Tags:
  • Access: - public
[ Top ]

whois (line 396)
void whois ( $target, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $target  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
requests a 'WHOIS' from the specified target

Tags:
  • Access: - public
[ Top ]

whowas (line 410)
void whowas ( $target, [$priority = SMARTIRC_MEDIUM] )

Parameters:
  •  
string   $target  
  •  
integer   $priority   message priority, default is SMARTIRC_MEDIUM

Description:
requests a 'WHOWAS' from the specified target (if he left the IRC network)

Tags:
  • Access: - public
[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_ircuser.html0000620000175000017500000006347512514342261024213 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_ircuser
Net_SmartIRC_user
   |
   --Net_SmartIRC_ircuser



  • Package: - Net_SmartIRC

Inherited Variables

Class Variables

$joinedchannels (line 2478)
Data type: array

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_listenfor.html0000620000175000017500000006360512514342261024537 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_listenfor



  • Package: - Net_SmartIRC

Class Variables

$result (line 2490)
Data type: array

Tags:
  • Access: - public
[ Top ]




Class Methods

handler (line 2499)
void handler ( &$irc, &$ircdata )

Parameters:
  •  
object   $irc  
  •  
object   $ircdata  

Description:
stores the received answer into the result array

[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_messagehandler.html0000620000175000017500000015673012514342261025516 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_messagehandler
Net_SmartIRC_base
   |
   --Net_SmartIRC_irccommands
      |
      --Net_SmartIRC_messagehandler

$Id$



Child classes:

Inherited Variables

Inherited Methods

Class: Net_SmartIRC_irccommands

ban - bans a hostmask for the given channel or requests the current banlist
changeNick - changes the own nickname
channel - returns an object reference to the specified channel
deop - deops an user in the given channel
devoice - devoice a user in the given channel
getList - gets a list of one ore more channels
getTopic - gets the topic of a channel
invite - invites a user to the specified channel
join - Joins one or more IRC channels with an optional key.
kick - Kicks one or more user from an IRC channel with an optional reason.
message - sends a new message
mode - sets or gets the mode of an user or channel
names - requests all nicknames of one or more channels
op - ops an user in the given channel
part - parts from one or more IRC channels with an optional reason
quit - sends QUIT to IRC server and disconnects
setTopic - sets a new topic of a channel
unban - unbans a hostmask on the given channel
voice - voice a user in the given channel
who - requests a 'WHO' from the specified target
whois - requests a 'WHOIS' from the specified target
whowas - requests a 'WHOWAS' from the specified target (if he left the IRC network)

Class: Net_SmartIRC_base

connect - Creates the sockets and connects to the IRC server on the given port.
disconnect - Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
getMotd - Returns the full motd.
getUsermode - Returns the usermode.
isBanned - Checks if the hostmask is on the specified channel banned and returns the result.
isError
isJoined - checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
isOpped - Checks if we or the given user is opped on the specified channel and returns the result.
isVoiced - Checks if we or the given user is voiced on the specified channel and returns the result.
listen - goes into receive mode
listenFor - waits for a special message type and puts the answer in $result
log - Adds an entry to the log.
login - login and register nickname on the IRC network
Net_SmartIRC - Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
reconnect - Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler - registers a new actionhandler and returns the assigned id
registerTimehandler - registers a timehandler and returns the assigned id
setAutoReconnect - Enables/disables autoreconnecting.
setAutoRetry - Enables/disables autoretry for connecting to a server.
setBenchmark - Enables/disables the benchmark engine.
setChannelSynching - Deprecated, use setChannelSyncing() instead!
setChannelSyncing - Enables/disables channel syncing.
setCtcpVersion - Sets the CTCP version reply string.
setDebug - Sets the level of debug messages.
setDisconnecttime - Sets the delaytime before closing the socket when disconnect.
setLogdestination - Sets the destination of all log messages.
setLogfile - Sets the file for the log if the destination is set to file.
setReceivedelay - Sets the delay for receiving data from the IRC server.
setReceiveTimeout - Sets the receive timeout.
setSenddelay - Sets the delay for sending data to the IRC server.
setTransmitTimeout - Sets the transmit timeout.
setUseSockets - Enables/disables the usage of real sockets.
showBenchmark - Shows the benchmark result.
startBenchmark - Starts the benchmark (sets the counters).
stopBenchmark - Stops the benchmark and displays the result.
throwError
unregisterActionhandler - unregisters an existing actionhandler
unregisterActionid - unregisters an existing actionhandler via the id
unregisterTimeid - unregisters an existing timehandler via the id

Class Methods

_event_error (line 35)
void _event_error ( &$ircdata )

[ Top ]

_event_err_nicknameinuse (line 402)
void _event_err_nicknameinuse ( &$ircdata )

[ Top ]

_event_join (line 44)
void _event_join ( &$ircdata )

[ Top ]

_event_kick (line 77)
void _event_kick ( &$ircdata )

[ Top ]

_event_mode (line 131)
void _event_mode ( &$ircdata )

[ Top ]

_event_nick (line 91)
void _event_nick ( &$ircdata )

[ Top ]

_event_part (line 70)
void _event_part ( &$ircdata )

[ Top ]

_event_ping (line 30)
void _event_ping ( &$ircdata )

[ Top ]

_event_privmsg (line 231)
void _event_privmsg ( &$ircdata )

[ Top ]

_event_quit (line 84)
void _event_quit ( &$ircdata )

[ Top ]

_event_rpl_banlist (line 383)
void _event_rpl_banlist ( &$ircdata )

[ Top ]

_event_rpl_channelmodeis (line 279)
void _event_rpl_channelmodeis ( &$ircdata )

[ Top ]

_event_rpl_endofmotd (line 269)
void _event_rpl_endofmotd ( &$ircdata )

[ Top ]

_event_rpl_motd (line 264)
void _event_rpl_motd ( &$ircdata )

[ Top ]

_event_rpl_motdstart (line 259)
void _event_rpl_motdstart ( &$ircdata )

[ Top ]

_event_rpl_namreply (line 354)
void _event_rpl_namreply ( &$ircdata )

[ Top ]

_event_rpl_topic (line 392)
void _event_rpl_topic ( &$ircdata )

[ Top ]

_event_rpl_umodeis (line 274)
void _event_rpl_umodeis ( &$ircdata )

[ Top ]

_event_rpl_welcome (line 250)
void _event_rpl_welcome ( &$ircdata )

[ Top ]

_event_rpl_whoreply (line 298)
void _event_rpl_whoreply ( &$ircdata )

[ Top ]

_event_topic (line 223)
void _event_topic ( &$ircdata )

[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:10 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_timehandler.html0000620000175000017500000007010112514342261025013 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_timehandler



  • Package: - Net_SmartIRC

Class Variables

$id (line 2316)
Data type: integer

Tags:
  • Access: - public
[ Top ]


$interval (line 2322)
Data type: integer

Tags:
  • Access: - public
[ Top ]


$lastmicrotimestamp (line 2328)
Data type: integer

Tags:
  • Access: - public
[ Top ]


$method (line 2340)
Data type: string

Tags:
  • Access: - public
[ Top ]


$object (line 2334)
Data type: object

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/Net_SmartIRC_user.html0000620000175000017500000007651412514342261023513 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Net_SmartIRC_user



  • Package: - Net_SmartIRC

Child classes:

Class Variables

$away (line 2436)
Data type: boolean

Tags:
  • Access: - public
[ Top ]


$hopcount (line 2448)
Data type: integer

Tags:
  • Access: - public
[ Top ]


$host (line 2418)
Data type: string

Tags:
  • Access: - public
[ Top ]


$ident (line 2412)
Data type: string

Tags:
  • Access: - public
[ Top ]


$ircop (line 2430)
Data type: boolean

Tags:
  • Access: - public
[ Top ]


$nick (line 2406)
Data type: string

Tags:
  • Access: - public
[ Top ]


$realname (line 2424)
Data type: string

Tags:
  • Access: - public
[ Top ]


$server (line 2442)
Data type: string

Tags:
  • Access: - public
[ Top ]




Documentation generated on Wed, 23 Jul 2003 19:59:13 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example2_php.html0000620000175000017500000005370312514342261027006 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example3_php.html0000620000175000017500000005373012514342261027007 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example4_php.html0000620000175000017500000005373012514342261027010 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example5_php.html0000620000175000017500000005373012514342261027011 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example6_php.html0000620000175000017500000005373012514342261027012 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example7_php.html0000620000175000017500000005373012514342261027013 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 29]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_examples_example_php.html0000620000175000017500000005400612514342261026721 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:

mybot


Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('../SmartIRC.php') [line 28]






Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_SmartIRC_defines_php.html0000620000175000017500000012772712514342261026524 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:



Page Details:

Tags:
  • Package: - Net_SmartIRC






Constants:
'SMARTIRC_'.$key (line 231)
'SMARTIRC_'.$key: $value
[ Top ]

SMARTIRC_BROWSEROUT (line 33)
SMARTIRC_BROWSEROUT: 3
[ Top ]

SMARTIRC_CRITICAL (line 38)
SMARTIRC_CRITICAL: 3
[ Top ]

SMARTIRC_CRLF (line 28)
SMARTIRC_CRLF: "\r\n"
Description:
$Id$

$Revision$ $Author$ $Date$

Copyright (c) 2002-2003 Mirco "MEEBEY" Bauer <mail@meebey.net> <http://www.meebey.net>

Full LGPL License: <http://www.meebey.net/lgpl.txt>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


[ Top ]

SMARTIRC_DEBUG_ACTIONHANDLER (line 48)
SMARTIRC_DEBUG_ACTIONHANDLER: 32
[ Top ]

SMARTIRC_DEBUG_ALL (line 55)
SMARTIRC_DEBUG_ALL: 4095
[ Top ]

SMARTIRC_DEBUG_CHANNELSYNCING (line 51)
SMARTIRC_DEBUG_CHANNELSYNCING: 256
[ Top ]

SMARTIRC_DEBUG_CONNECTION (line 44)
SMARTIRC_DEBUG_CONNECTION: 2
[ Top ]

SMARTIRC_DEBUG_IRCMESSAGES (line 46)
SMARTIRC_DEBUG_IRCMESSAGES: 8
[ Top ]

SMARTIRC_DEBUG_MESSAGEHANDLER (line 50)
SMARTIRC_DEBUG_MESSAGEHANDLER: 128
[ Top ]

SMARTIRC_DEBUG_MESSAGEPARSER (line 54)
SMARTIRC_DEBUG_MESSAGEPARSER: 2048
[ Top ]

SMARTIRC_DEBUG_MESSAGETYPES (line 47)
SMARTIRC_DEBUG_MESSAGETYPES: 16
[ Top ]

SMARTIRC_DEBUG_MODULES (line 52)
SMARTIRC_DEBUG_MODULES: 512
[ Top ]

SMARTIRC_DEBUG_NONE (line 42)
SMARTIRC_DEBUG_NONE:
[ Top ]

SMARTIRC_DEBUG_NOTICE (line 43)
SMARTIRC_DEBUG_NOTICE: 1
[ Top ]

SMARTIRC_DEBUG_SOCKET (line 45)
SMARTIRC_DEBUG_SOCKET: 4
[ Top ]

SMARTIRC_DEBUG_TIMEHANDLER (line 49)
SMARTIRC_DEBUG_TIMEHANDLER: 64
[ Top ]

SMARTIRC_DEBUG_USERSYNCING (line 53)
SMARTIRC_DEBUG_USERSYNCING: 1024
[ Top ]

SMARTIRC_FILE (line 31)
SMARTIRC_FILE: 1
[ Top ]

SMARTIRC_HIGH (line 37)
SMARTIRC_HIGH: 2
[ Top ]

SMARTIRC_LOW (line 35)
SMARTIRC_LOW:
[ Top ]

SMARTIRC_MEDIUM (line 36)
SMARTIRC_MEDIUM: 1
[ Top ]

SMARTIRC_NONE (line 34)
SMARTIRC_NONE: 4
[ Top ]

SMARTIRC_STATE_CONNECTED (line 41)
SMARTIRC_STATE_CONNECTED: 2
[ Top ]

SMARTIRC_STATE_CONNECTING (line 40)
SMARTIRC_STATE_CONNECTING: 1
[ Top ]

SMARTIRC_STATE_DISCONNECTED (line 39)
SMARTIRC_STATE_DISCONNECTED:
[ Top ]

SMARTIRC_STDOUT (line 30)
SMARTIRC_STDOUT:
[ Top ]

SMARTIRC_SYSLOG (line 32)
SMARTIRC_SYSLOG: 2
[ Top ]

SMARTIRC_TYPE_ACTION (line 64)
SMARTIRC_TYPE_ACTION: 256
[ Top ]

SMARTIRC_TYPE_ALL (line 86)
SMARTIRC_TYPE_ALL: 1073741823
[ Top ]

SMARTIRC_TYPE_BANLIST (line 77)
SMARTIRC_TYPE_BANLIST: 2097152
[ Top ]

SMARTIRC_TYPE_CHANNEL (line 57)
SMARTIRC_TYPE_CHANNEL: 2
[ Top ]

SMARTIRC_TYPE_CHANNELMODE (line 83)
SMARTIRC_TYPE_CHANNELMODE: 134217728
[ Top ]

SMARTIRC_TYPE_CTCP (line 59)
SMARTIRC_TYPE_CTCP: 8
[ Top ]

SMARTIRC_TYPE_CTCP_REPLY (line 85)
SMARTIRC_TYPE_CTCP_REPLY: 536870912
[ Top ]

SMARTIRC_TYPE_CTCP_REQUEST (line 84)
SMARTIRC_TYPE_CTCP_REQUEST: 268435456
[ Top ]

SMARTIRC_TYPE_ERROR (line 76)
SMARTIRC_TYPE_ERROR: 1048576
[ Top ]

SMARTIRC_TYPE_INFO (line 70)
SMARTIRC_TYPE_INFO: 16384
[ Top ]

SMARTIRC_TYPE_INVITE (line 63)
SMARTIRC_TYPE_INVITE: 128
[ Top ]

SMARTIRC_TYPE_JOIN (line 62)
SMARTIRC_TYPE_JOIN: 64
[ Top ]

SMARTIRC_TYPE_KICK (line 67)
SMARTIRC_TYPE_KICK: 2048
[ Top ]

SMARTIRC_TYPE_LIST (line 71)
SMARTIRC_TYPE_LIST: 32768
[ Top ]

SMARTIRC_TYPE_LOGIN (line 69)
SMARTIRC_TYPE_LOGIN: 8192
[ Top ]

SMARTIRC_TYPE_MODECHANGE (line 74)
SMARTIRC_TYPE_MODECHANGE: 262144
[ Top ]

SMARTIRC_TYPE_MOTD (line 73)
SMARTIRC_TYPE_MOTD: 131072
[ Top ]

SMARTIRC_TYPE_NAME (line 72)
SMARTIRC_TYPE_NAME: 65536
[ Top ]

SMARTIRC_TYPE_NICKCHANGE (line 66)
SMARTIRC_TYPE_NICKCHANGE: 1024
[ Top ]

SMARTIRC_TYPE_NONRELEVANT (line 79)
SMARTIRC_TYPE_NONRELEVANT: 8388608
[ Top ]

SMARTIRC_TYPE_NOTICE (line 60)
SMARTIRC_TYPE_NOTICE: 16
[ Top ]

SMARTIRC_TYPE_PART (line 75)
SMARTIRC_TYPE_PART: 524288
[ Top ]

SMARTIRC_TYPE_QUERY (line 58)
SMARTIRC_TYPE_QUERY: 4
[ Top ]

SMARTIRC_TYPE_QUIT (line 68)
SMARTIRC_TYPE_QUIT: 4096
[ Top ]

SMARTIRC_TYPE_TOPIC (line 78)
SMARTIRC_TYPE_TOPIC: 4194304
[ Top ]

SMARTIRC_TYPE_TOPICCHANGE (line 65)
SMARTIRC_TYPE_TOPICCHANGE: 512
[ Top ]

SMARTIRC_TYPE_UNKNOWN (line 56)
SMARTIRC_TYPE_UNKNOWN: 1
[ Top ]

SMARTIRC_TYPE_USERMODE (line 82)
SMARTIRC_TYPE_USERMODE: 67108864
[ Top ]

SMARTIRC_TYPE_WHO (line 61)
SMARTIRC_TYPE_WHO: 32
[ Top ]

SMARTIRC_TYPE_WHOIS (line 80)
SMARTIRC_TYPE_WHOIS: 16777216
[ Top ]

SMARTIRC_TYPE_WHOWAS (line 81)
SMARTIRC_TYPE_WHOWAS: 33554432
[ Top ]

SMARTIRC_UNUSED (line 29)
SMARTIRC_UNUSED: '*'
[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:08 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_SmartIRC_irccommands_php.html0000620000175000017500000005372312514342261027400 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:





Classes:

Net_SmartIRC_irccommands
$Id$


Page Details:

Tags:
  • Package: - Net_SmartIRC








Documentation generated on Wed, 23 Jul 2003 19:59:09 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_SmartIRC_messagehandler_php.html0000620000175000017500000005373112514342261030062 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:







Page Details:

Tags:
  • Package: - Net_SmartIRC








Documentation generated on Wed, 23 Jul 2003 19:59:10 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/Net_SmartIRC/_SmartIRC-0.5.5_SmartIRC_php.html0000620000175000017500000005762712514342261025030 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:







Page Details:

Tags:
  • Package: - Net_SmartIRC


Includes:

include_once('SmartIRC/irccommands.php') [line 47]
include_once('SmartIRC/messagehandler.php') [line 48]
include_once('SmartIRC/defines.php') [line 46]




Constants:
SMARTIRC_VERSION (line 49)
SMARTIRC_VERSION: '0.5.5 ($Revision$)'
[ Top ]

SMARTIRC_VERSIONSTRING (line 50)
SMARTIRC_VERSIONSTRING: 'Net_SmartIRC '.SMARTIRC_VERSION
[ Top ]



Documentation generated on Wed, 23 Jul 2003 19:59:11 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/classtrees_Net_SmartIRC.html0000620000175000017500000005713712514342261022453 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Class Trees for Package Net_SmartIRC


Root class mybot


Root class mybot


Root class mybot


Root class mybot


Root class mybot


Root class mybot


Root class Net_SmartIRC_actionhandler


Root class Net_SmartIRC_base


Root class Net_SmartIRC_channel


Root class Net_SmartIRC_data


Root class Net_SmartIRC_Error


Root class Net_SmartIRC_listenfor


Root class Net_SmartIRC_timehandler


Root class Net_SmartIRC_user


Documentation generated on Wed, 23 Jul 2003 19:59:08 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/elementindex.html0000620000175000017500000017627312514342261020455 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Index of all elements

[ ' ] [ a ] [ b ] [ c ] [ d ] [ e ] [ f ] [ g ] [ h ] [ i ] [ j ] [ k ] [ l ] [ m ] [ n ] [ o ] [ p ] [ q ] [ r ] [ s ] [ t ] [ u ] [ v ] [ w ] [ _ ]

'

'SMARTIRC_'.$key
in file defines.php, constant 'SMARTIRC_'.$key
top

a

$away
in file SmartIRC.php, variable Net_SmartIRC_user::$away
top

b

$bans
in file SmartIRC.php, variable Net_SmartIRC_channel::$bans
ban
in file irccommands.php, method Net_SmartIRC_irccommands::ban()
    bans a hostmask for the given channel or requests the current banlist
top

c

$channel
in file SmartIRC.php, variable Net_SmartIRC_base::$channel
    Stores all channels in this array where we are joined, works only if channelsyncing is activated.
$channel
in file SmartIRC.php, variable Net_SmartIRC_data::$channel
changeNick
in file irccommands.php, method Net_SmartIRC_irccommands::changeNick()
    changes the own nickname
channel
in file irccommands.php, method Net_SmartIRC_irccommands::channel()
    returns an object reference to the specified channel
channel_test
in file example.php, method mybot::channel_test()
connect
in file SmartIRC.php, method Net_SmartIRC_base::connect()
    Creates the sockets and connects to the IRC server on the given port.
top

d

deop
in file irccommands.php, method Net_SmartIRC_irccommands::deop()
    deops an user in the given channel
devoice
in file irccommands.php, method Net_SmartIRC_irccommands::devoice()
    devoice a user in the given channel
disconnect
in file SmartIRC.php, method Net_SmartIRC_base::disconnect()
    Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
defines.php
procedural page defines.php
top

e

$error_msg
in file SmartIRC.php, variable Net_SmartIRC_Error::$error_msg
example2.php
procedural page example2.php
example3.php
procedural page example3.php
example4.php
procedural page example4.php
example5.php
procedural page example5.php
example6.php
procedural page example6.php
example7.php
procedural page example7.php
example.php
procedural page example.php
top

f

$from
in file SmartIRC.php, variable Net_SmartIRC_data::$from
top

g

getList
in file irccommands.php, method Net_SmartIRC_irccommands::getList()
    gets a list of one ore more channels
getMessage
in file SmartIRC.php, method Net_SmartIRC_Error::getMessage()
getMotd
in file SmartIRC.php, method Net_SmartIRC_base::getMotd()
    Returns the full motd.
getTopic
in file irccommands.php, method Net_SmartIRC_irccommands::getTopic()
    gets the topic of a channel
getUsermode
in file SmartIRC.php, method Net_SmartIRC_base::getUsermode()
    Returns the usermode.
top

h

$hopcount
in file SmartIRC.php, variable Net_SmartIRC_user::$hopcount
$host
in file SmartIRC.php, variable Net_SmartIRC_data::$host
$host
in file SmartIRC.php, variable Net_SmartIRC_user::$host
handler
in file SmartIRC.php, method Net_SmartIRC_listenfor::handler()
    stores the received answer into the result array
top

i

$id
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$id
$id
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$id
$ident
in file SmartIRC.php, variable Net_SmartIRC_user::$ident
$ident
in file SmartIRC.php, variable Net_SmartIRC_data::$ident
$interval
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$interval
$ircop
in file SmartIRC.php, variable Net_SmartIRC_user::$ircop
invite
in file irccommands.php, method Net_SmartIRC_irccommands::invite()
    invites a user to the specified channel
isBanned
in file SmartIRC.php, method Net_SmartIRC_base::isBanned()
    Checks if the hostmask is on the specified channel banned and returns the result.
isError
in file SmartIRC.php, method Net_SmartIRC_base::isError()
isJoined
in file SmartIRC.php, method Net_SmartIRC_base::isJoined()
    checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
isOpped
in file SmartIRC.php, method Net_SmartIRC_base::isOpped()
    Checks if we or the given user is opped on the specified channel and returns the result.
isVoiced
in file SmartIRC.php, method Net_SmartIRC_base::isVoiced()
    Checks if we or the given user is voiced on the specified channel and returns the result.
irccommands.php
procedural page irccommands.php
top

j

$joinedchannels
in file SmartIRC.php, variable Net_SmartIRC_ircuser::$joinedchannels
join
in file irccommands.php, method Net_SmartIRC_irccommands::join()
    Joins one or more IRC channels with an optional key.
top

k

$key
in file SmartIRC.php, variable Net_SmartIRC_channel::$key
kick
in file irccommands.php, method Net_SmartIRC_irccommands::kick()
    Kicks one or more user from an IRC channel with an optional reason.
top

l

$lastmicrotimestamp
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$lastmicrotimestamp
listen
in file SmartIRC.php, method Net_SmartIRC_base::listen()
    goes into receive mode
listenFor
in file SmartIRC.php, method Net_SmartIRC_base::listenFor()
    waits for a special message type and puts the answer in $result
log
in file SmartIRC.php, method Net_SmartIRC_base::log()
    Adds an entry to the log.
login
in file SmartIRC.php, method Net_SmartIRC_base::login()
    login and register nickname on the IRC network
top

m

$message
in file SmartIRC.php, variable Net_SmartIRC_data::$message
$message
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$message
$messageex
in file SmartIRC.php, variable Net_SmartIRC_data::$messageex
$method
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$method
$method
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$method
$mode
in file SmartIRC.php, variable Net_SmartIRC_channel::$mode
message
in file irccommands.php, method Net_SmartIRC_irccommands::message()
    sends a new message
mode
in file irccommands.php, method Net_SmartIRC_irccommands::mode()
    sets or gets the mode of an user or channel
mybot
in file example.php, class mybot
messagehandler.php
procedural page messagehandler.php
top

n

$name
in file SmartIRC.php, variable Net_SmartIRC_channel::$name
$nick
in file SmartIRC.php, variable Net_SmartIRC_data::$nick
$nick
in file SmartIRC.php, variable Net_SmartIRC_user::$nick
$nreplycodes
in file SmartIRC.php, variable Net_SmartIRC_base::$nreplycodes
    All numeric IRC replycodes, the index is the numeric replycode.
names
in file irccommands.php, method Net_SmartIRC_irccommands::names()
    requests all nicknames of one or more channels
Net_SmartIRC
in file SmartIRC.php, class Net_SmartIRC
    $Id$
Net_SmartIRC
in file SmartIRC.php, method Net_SmartIRC_base::Net_SmartIRC()
    Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
Net_SmartIRC_actionhandler
in file SmartIRC.php, class Net_SmartIRC_actionhandler
Net_SmartIRC_base
in file SmartIRC.php, class Net_SmartIRC_base
    main SmartIRC class
Net_SmartIRC_channel
in file SmartIRC.php, class Net_SmartIRC_channel
Net_SmartIRC_channeluser
in file SmartIRC.php, class Net_SmartIRC_channeluser
Net_SmartIRC_data
in file SmartIRC.php, class Net_SmartIRC_data
Net_SmartIRC_Error
in file SmartIRC.php, class Net_SmartIRC_Error
Net_SmartIRC_Error
in file SmartIRC.php, method Net_SmartIRC_Error::Net_SmartIRC_Error()
Net_SmartIRC_irccommands
in file irccommands.php, class Net_SmartIRC_irccommands
    $Id$
Net_SmartIRC_ircuser
in file SmartIRC.php, class Net_SmartIRC_ircuser
Net_SmartIRC_listenfor
in file SmartIRC.php, class Net_SmartIRC_listenfor
Net_SmartIRC_messagehandler
in file messagehandler.php, class Net_SmartIRC_messagehandler
    $Id$
Net_SmartIRC_timehandler
in file SmartIRC.php, class Net_SmartIRC_timehandler
Net_SmartIRC_user
in file SmartIRC.php, class Net_SmartIRC_user
top

o

$object
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$object
$object
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$object
$op
in file SmartIRC.php, variable Net_SmartIRC_channeluser::$op
$ops
in file SmartIRC.php, variable Net_SmartIRC_channel::$ops
op
in file irccommands.php, method Net_SmartIRC_irccommands::op()
    ops an user in the given channel
top

p

part
in file irccommands.php, method Net_SmartIRC_irccommands::part()
    parts from one or more IRC channels with an optional reason
top

q

query_test
in file example.php, method mybot::query_test()
quit
in file irccommands.php, method Net_SmartIRC_irccommands::quit()
    sends QUIT to IRC server and disconnects
top

r

$rawmessage
in file SmartIRC.php, variable Net_SmartIRC_data::$rawmessage
$rawmessageex
in file SmartIRC.php, variable Net_SmartIRC_data::$rawmessageex
$realname
in file SmartIRC.php, variable Net_SmartIRC_user::$realname
$replycodes
in file SmartIRC.php, variable Net_SmartIRC_base::$replycodes
    All IRC replycodes, the index is the replycode name.
$result
in file SmartIRC.php, variable Net_SmartIRC_listenfor::$result
reconnect
in file SmartIRC.php, method Net_SmartIRC_base::reconnect()
    Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler
in file SmartIRC.php, method Net_SmartIRC_base::registerActionhandler()
    registers a new actionhandler and returns the assigned id
registerTimehandler
in file SmartIRC.php, method Net_SmartIRC_base::registerTimehandler()
    registers a timehandler and returns the assigned id
top

s

$server
in file SmartIRC.php, variable Net_SmartIRC_user::$server
setAutoReconnect
in file SmartIRC.php, method Net_SmartIRC_base::setAutoReconnect()
    Enables/disables autoreconnecting.
setAutoRetry
in file SmartIRC.php, method Net_SmartIRC_base::setAutoRetry()
    Enables/disables autoretry for connecting to a server.
setBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::setBenchmark()
    Enables/disables the benchmark engine.
setChannelSynching
in file SmartIRC.php, method Net_SmartIRC_base::setChannelSynching()
    Deprecated, use setChannelSyncing() instead!
setChannelSyncing
in file SmartIRC.php, method Net_SmartIRC_base::setChannelSyncing()
    Enables/disables channel syncing.
setCtcpVersion
in file SmartIRC.php, method Net_SmartIRC_base::setCtcpVersion()
    Sets the CTCP version reply string.
setDebug
in file SmartIRC.php, method Net_SmartIRC_base::setDebug()
    Sets the level of debug messages.
setDisconnecttime
in file SmartIRC.php, method Net_SmartIRC_base::setDisconnecttime()
    Sets the delaytime before closing the socket when disconnect.
setLogdestination
in file SmartIRC.php, method Net_SmartIRC_base::setLogdestination()
    Sets the destination of all log messages.
setLogfile
in file SmartIRC.php, method Net_SmartIRC_base::setLogfile()
    Sets the file for the log if the destination is set to file.
setReceivedelay
in file SmartIRC.php, method Net_SmartIRC_base::setReceivedelay()
    Sets the delay for receiving data from the IRC server.
setReceiveTimeout
in file SmartIRC.php, method Net_SmartIRC_base::setReceiveTimeout()
    Sets the receive timeout.
setSenddelay
in file SmartIRC.php, method Net_SmartIRC_base::setSenddelay()
    Sets the delay for sending data to the IRC server.
setTopic
in file irccommands.php, method Net_SmartIRC_irccommands::setTopic()
    sets a new topic of a channel
setTransmitTimeout
in file SmartIRC.php, method Net_SmartIRC_base::setTransmitTimeout()
    Sets the transmit timeout.
setUseSockets
in file SmartIRC.php, method Net_SmartIRC_base::setUseSockets()
    Enables/disables the usage of real sockets.
showBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::showBenchmark()
    Shows the benchmark result.
SmartIRC.php
procedural page SmartIRC.php
SMARTIRC_BROWSEROUT
in file defines.php, constant SMARTIRC_BROWSEROUT
SMARTIRC_CRITICAL
in file defines.php, constant SMARTIRC_CRITICAL
SMARTIRC_CRLF
in file defines.php, constant SMARTIRC_CRLF
    $Id$
SMARTIRC_DEBUG_ACTIONHANDLER
in file defines.php, constant SMARTIRC_DEBUG_ACTIONHANDLER
SMARTIRC_DEBUG_ALL
in file defines.php, constant SMARTIRC_DEBUG_ALL
SMARTIRC_DEBUG_CHANNELSYNCING
in file defines.php, constant SMARTIRC_DEBUG_CHANNELSYNCING
SMARTIRC_DEBUG_CONNECTION
in file defines.php, constant SMARTIRC_DEBUG_CONNECTION
SMARTIRC_DEBUG_IRCMESSAGES
in file defines.php, constant SMARTIRC_DEBUG_IRCMESSAGES
SMARTIRC_DEBUG_MESSAGEHANDLER
in file defines.php, constant SMARTIRC_DEBUG_MESSAGEHANDLER
SMARTIRC_DEBUG_MESSAGEPARSER
in file defines.php, constant SMARTIRC_DEBUG_MESSAGEPARSER
SMARTIRC_DEBUG_MESSAGETYPES
in file defines.php, constant SMARTIRC_DEBUG_MESSAGETYPES
SMARTIRC_DEBUG_MODULES
in file defines.php, constant SMARTIRC_DEBUG_MODULES
SMARTIRC_DEBUG_NONE
in file defines.php, constant SMARTIRC_DEBUG_NONE
SMARTIRC_DEBUG_NOTICE
in file defines.php, constant SMARTIRC_DEBUG_NOTICE
SMARTIRC_DEBUG_SOCKET
in file defines.php, constant SMARTIRC_DEBUG_SOCKET
SMARTIRC_DEBUG_TIMEHANDLER
in file defines.php, constant SMARTIRC_DEBUG_TIMEHANDLER
SMARTIRC_DEBUG_USERSYNCING
in file defines.php, constant SMARTIRC_DEBUG_USERSYNCING
SMARTIRC_FILE
in file defines.php, constant SMARTIRC_FILE
SMARTIRC_HIGH
in file defines.php, constant SMARTIRC_HIGH
SMARTIRC_LOW
in file defines.php, constant SMARTIRC_LOW
SMARTIRC_MEDIUM
in file defines.php, constant SMARTIRC_MEDIUM
SMARTIRC_NONE
in file defines.php, constant SMARTIRC_NONE
SMARTIRC_STATE_CONNECTED
in file defines.php, constant SMARTIRC_STATE_CONNECTED
SMARTIRC_STATE_CONNECTING
in file defines.php, constant SMARTIRC_STATE_CONNECTING
SMARTIRC_STATE_DISCONNECTED
in file defines.php, constant SMARTIRC_STATE_DISCONNECTED
SMARTIRC_STDOUT
in file defines.php, constant SMARTIRC_STDOUT
SMARTIRC_SYSLOG
in file defines.php, constant SMARTIRC_SYSLOG
SMARTIRC_TYPE_ACTION
in file defines.php, constant SMARTIRC_TYPE_ACTION
SMARTIRC_TYPE_ALL
in file defines.php, constant SMARTIRC_TYPE_ALL
SMARTIRC_TYPE_BANLIST
in file defines.php, constant SMARTIRC_TYPE_BANLIST
SMARTIRC_TYPE_CHANNEL
in file defines.php, constant SMARTIRC_TYPE_CHANNEL
SMARTIRC_TYPE_CHANNELMODE
in file defines.php, constant SMARTIRC_TYPE_CHANNELMODE
SMARTIRC_TYPE_CTCP
in file defines.php, constant SMARTIRC_TYPE_CTCP
SMARTIRC_TYPE_CTCP_REPLY
in file defines.php, constant SMARTIRC_TYPE_CTCP_REPLY
SMARTIRC_TYPE_CTCP_REQUEST
in file defines.php, constant SMARTIRC_TYPE_CTCP_REQUEST
SMARTIRC_TYPE_ERROR
in file defines.php, constant SMARTIRC_TYPE_ERROR
SMARTIRC_TYPE_INFO
in file defines.php, constant SMARTIRC_TYPE_INFO
SMARTIRC_TYPE_INVITE
in file defines.php, constant SMARTIRC_TYPE_INVITE
SMARTIRC_TYPE_JOIN
in file defines.php, constant SMARTIRC_TYPE_JOIN
SMARTIRC_TYPE_KICK
in file defines.php, constant SMARTIRC_TYPE_KICK
SMARTIRC_TYPE_LIST
in file defines.php, constant SMARTIRC_TYPE_LIST
SMARTIRC_TYPE_LOGIN
in file defines.php, constant SMARTIRC_TYPE_LOGIN
SMARTIRC_TYPE_MODECHANGE
in file defines.php, constant SMARTIRC_TYPE_MODECHANGE
SMARTIRC_TYPE_MOTD
in file defines.php, constant SMARTIRC_TYPE_MOTD
SMARTIRC_TYPE_NAME
in file defines.php, constant SMARTIRC_TYPE_NAME
SMARTIRC_TYPE_NICKCHANGE
in file defines.php, constant SMARTIRC_TYPE_NICKCHANGE
SMARTIRC_TYPE_NONRELEVANT
in file defines.php, constant SMARTIRC_TYPE_NONRELEVANT
SMARTIRC_TYPE_NOTICE
in file defines.php, constant SMARTIRC_TYPE_NOTICE
SMARTIRC_TYPE_PART
in file defines.php, constant SMARTIRC_TYPE_PART
SMARTIRC_TYPE_QUERY
in file defines.php, constant SMARTIRC_TYPE_QUERY
SMARTIRC_TYPE_QUIT
in file defines.php, constant SMARTIRC_TYPE_QUIT
SMARTIRC_TYPE_TOPIC
in file defines.php, constant SMARTIRC_TYPE_TOPIC
SMARTIRC_TYPE_TOPICCHANGE
in file defines.php, constant SMARTIRC_TYPE_TOPICCHANGE
SMARTIRC_TYPE_UNKNOWN
in file defines.php, constant SMARTIRC_TYPE_UNKNOWN
SMARTIRC_TYPE_USERMODE
in file defines.php, constant SMARTIRC_TYPE_USERMODE
SMARTIRC_TYPE_WHO
in file defines.php, constant SMARTIRC_TYPE_WHO
SMARTIRC_TYPE_WHOIS
in file defines.php, constant SMARTIRC_TYPE_WHOIS
SMARTIRC_TYPE_WHOWAS
in file defines.php, constant SMARTIRC_TYPE_WHOWAS
SMARTIRC_UNUSED
in file defines.php, constant SMARTIRC_UNUSED
SMARTIRC_VERSION
in file SmartIRC.php, constant SMARTIRC_VERSION
SMARTIRC_VERSIONSTRING
in file SmartIRC.php, constant SMARTIRC_VERSIONSTRING
startBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::startBenchmark()
    Starts the benchmark (sets the counters).
stopBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::stopBenchmark()
    Stops the benchmark and displays the result.
top

t

$topic
in file SmartIRC.php, variable Net_SmartIRC_channel::$topic
$type
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$type
$type
in file SmartIRC.php, variable Net_SmartIRC_data::$type
throwError
in file SmartIRC.php, method Net_SmartIRC_base::throwError()
top

u

$users
in file SmartIRC.php, variable Net_SmartIRC_channel::$users
unban
in file irccommands.php, method Net_SmartIRC_irccommands::unban()
    unbans a hostmask on the given channel
unregisterActionhandler
in file SmartIRC.php, method Net_SmartIRC_base::unregisterActionhandler()
    unregisters an existing actionhandler
unregisterActionid
in file SmartIRC.php, method Net_SmartIRC_base::unregisterActionid()
    unregisters an existing actionhandler via the id
unregisterTimeid
in file SmartIRC.php, method Net_SmartIRC_base::unregisterTimeid()
    unregisters an existing timehandler via the id
top

v

$voice
in file SmartIRC.php, variable Net_SmartIRC_channeluser::$voice
$voices
in file SmartIRC.php, variable Net_SmartIRC_channel::$voices
voice
in file irccommands.php, method Net_SmartIRC_irccommands::voice()
    voice a user in the given channel
top

w

who
in file irccommands.php, method Net_SmartIRC_irccommands::who()
    requests a 'WHO' from the specified target
whois
in file irccommands.php, method Net_SmartIRC_irccommands::whois()
    requests a 'WHOIS' from the specified target
whowas
in file irccommands.php, method Net_SmartIRC_irccommands::whowas()
    requests a 'WHOWAS' from the specified target (if he left the IRC network)
top

_

_event_error
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_error()
_event_err_nicknameinuse
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_err_nicknameinuse()
_event_join
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_join()
_event_kick
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_kick()
_event_mode
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_mode()
_event_nick
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_nick()
_event_part
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_part()
_event_ping
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_ping()
_event_privmsg
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_privmsg()
_event_quit
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_quit()
_event_rpl_banlist
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_banlist()
_event_rpl_channelmodeis
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_channelmodeis()
_event_rpl_endofmotd
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_endofmotd()
_event_rpl_motd
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_motd()
_event_rpl_motdstart
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_motdstart()
_event_rpl_namreply
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_namreply()
_event_rpl_topic
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_topic()
_event_rpl_umodeis
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_umodeis()
_event_rpl_welcome
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_welcome()
_event_rpl_whoreply
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_whoreply()
_event_topic
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_topic()
top

Documentation generated on Wed, 23 Jul 2003 19:59:08 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/elementindex_Net_SmartIRC.html0000620000175000017500000021220612514342261022752 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Element index for package Net_SmartIRC

[ ' ] [ a ] [ b ] [ c ] [ d ] [ e ] [ f ] [ g ] [ h ] [ i ] [ j ] [ k ] [ l ] [ m ] [ n ] [ o ] [ p ] [ q ] [ r ] [ s ] [ t ] [ u ] [ v ] [ w ] [ _ ]

'

'SMARTIRC_'.$key
in file defines.php, constant 'SMARTIRC_'.$key
top

_

_event_error
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_error()
_event_err_nicknameinuse
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_err_nicknameinuse()
_event_join
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_join()
_event_kick
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_kick()
_event_mode
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_mode()
_event_nick
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_nick()
_event_part
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_part()
_event_ping
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_ping()
_event_privmsg
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_privmsg()
_event_quit
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_quit()
_event_rpl_banlist
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_banlist()
_event_rpl_channelmodeis
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_channelmodeis()
_event_rpl_endofmotd
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_endofmotd()
_event_rpl_motd
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_motd()
_event_rpl_motdstart
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_motdstart()
_event_rpl_namreply
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_namreply()
_event_rpl_topic
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_topic()
_event_rpl_umodeis
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_umodeis()
_event_rpl_welcome
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_welcome()
_event_rpl_whoreply
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_rpl_whoreply()
_event_topic
in file messagehandler.php, method Net_SmartIRC_messagehandler::_event_topic()
top

a

$away
in file SmartIRC.php, variable Net_SmartIRC_user::$away
top

b

$bans
in file SmartIRC.php, variable Net_SmartIRC_channel::$bans
ban
in file irccommands.php, method Net_SmartIRC_irccommands::ban()
    bans a hostmask for the given channel or requests the current banlist
top

c

$channel
in file SmartIRC.php, variable Net_SmartIRC_base::$channel
    Stores all channels in this array where we are joined, works only if channelsyncing is activated.
$channel
in file SmartIRC.php, variable Net_SmartIRC_data::$channel
changeNick
in file irccommands.php, method Net_SmartIRC_irccommands::changeNick()
    changes the own nickname
channel
in file irccommands.php, method Net_SmartIRC_irccommands::channel()
    returns an object reference to the specified channel
channel_test
in file example.php, method mybot::channel_test()
connect
in file SmartIRC.php, method Net_SmartIRC_base::connect()
    Creates the sockets and connects to the IRC server on the given port.
top

d

deop
in file irccommands.php, method Net_SmartIRC_irccommands::deop()
    deops an user in the given channel
devoice
in file irccommands.php, method Net_SmartIRC_irccommands::devoice()
    devoice a user in the given channel
disconnect
in file SmartIRC.php, method Net_SmartIRC_base::disconnect()
    Disconnects from the IRC server nicely with a QUIT or just destroys the socket.
defines.php
procedural page defines.php
top

e

$error_msg
in file SmartIRC.php, variable Net_SmartIRC_Error::$error_msg
example2.php
procedural page example2.php
example3.php
procedural page example3.php
example4.php
procedural page example4.php
example5.php
procedural page example5.php
example6.php
procedural page example6.php
example7.php
procedural page example7.php
example.php
procedural page example.php
top

f

$from
in file SmartIRC.php, variable Net_SmartIRC_data::$from
top

g

getList
in file irccommands.php, method Net_SmartIRC_irccommands::getList()
    gets a list of one ore more channels
getMessage
in file SmartIRC.php, method Net_SmartIRC_Error::getMessage()
getMotd
in file SmartIRC.php, method Net_SmartIRC_base::getMotd()
    Returns the full motd.
getTopic
in file irccommands.php, method Net_SmartIRC_irccommands::getTopic()
    gets the topic of a channel
getUsermode
in file SmartIRC.php, method Net_SmartIRC_base::getUsermode()
    Returns the usermode.
top

h

$hopcount
in file SmartIRC.php, variable Net_SmartIRC_user::$hopcount
$host
in file SmartIRC.php, variable Net_SmartIRC_data::$host
$host
in file SmartIRC.php, variable Net_SmartIRC_user::$host
handler
in file SmartIRC.php, method Net_SmartIRC_listenfor::handler()
    stores the received answer into the result array
top

i

$id
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$id
$id
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$id
$ident
in file SmartIRC.php, variable Net_SmartIRC_user::$ident
$ident
in file SmartIRC.php, variable Net_SmartIRC_data::$ident
$interval
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$interval
$ircop
in file SmartIRC.php, variable Net_SmartIRC_user::$ircop
invite
in file irccommands.php, method Net_SmartIRC_irccommands::invite()
    invites a user to the specified channel
isBanned
in file SmartIRC.php, method Net_SmartIRC_base::isBanned()
    Checks if the hostmask is on the specified channel banned and returns the result.
isError
in file SmartIRC.php, method Net_SmartIRC_base::isError()
isJoined
in file SmartIRC.php, method Net_SmartIRC_base::isJoined()
    checks if we or the given user is joined to the specified channel and returns the result ChannelSyncing is required for this.
isOpped
in file SmartIRC.php, method Net_SmartIRC_base::isOpped()
    Checks if we or the given user is opped on the specified channel and returns the result.
isVoiced
in file SmartIRC.php, method Net_SmartIRC_base::isVoiced()
    Checks if we or the given user is voiced on the specified channel and returns the result.
irccommands.php
procedural page irccommands.php
top

j

$joinedchannels
in file SmartIRC.php, variable Net_SmartIRC_ircuser::$joinedchannels
join
in file irccommands.php, method Net_SmartIRC_irccommands::join()
    Joins one or more IRC channels with an optional key.
top

k

$key
in file SmartIRC.php, variable Net_SmartIRC_channel::$key
kick
in file irccommands.php, method Net_SmartIRC_irccommands::kick()
    Kicks one or more user from an IRC channel with an optional reason.
top

l

$lastmicrotimestamp
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$lastmicrotimestamp
listen
in file SmartIRC.php, method Net_SmartIRC_base::listen()
    goes into receive mode
listenFor
in file SmartIRC.php, method Net_SmartIRC_base::listenFor()
    waits for a special message type and puts the answer in $result
log
in file SmartIRC.php, method Net_SmartIRC_base::log()
    Adds an entry to the log.
login
in file SmartIRC.php, method Net_SmartIRC_base::login()
    login and register nickname on the IRC network
top

m

$message
in file SmartIRC.php, variable Net_SmartIRC_data::$message
$message
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$message
$messageex
in file SmartIRC.php, variable Net_SmartIRC_data::$messageex
$method
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$method
$method
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$method
$mode
in file SmartIRC.php, variable Net_SmartIRC_channel::$mode
message
in file irccommands.php, method Net_SmartIRC_irccommands::message()
    sends a new message
mode
in file irccommands.php, method Net_SmartIRC_irccommands::mode()
    sets or gets the mode of an user or channel
mybot
in file example.php, class mybot
messagehandler.php
procedural page messagehandler.php
top

n

$name
in file SmartIRC.php, variable Net_SmartIRC_channel::$name
$nick
in file SmartIRC.php, variable Net_SmartIRC_data::$nick
$nick
in file SmartIRC.php, variable Net_SmartIRC_user::$nick
$nreplycodes
in file SmartIRC.php, variable Net_SmartIRC_base::$nreplycodes
    All numeric IRC replycodes, the index is the numeric replycode.
names
in file irccommands.php, method Net_SmartIRC_irccommands::names()
    requests all nicknames of one or more channels
Net_SmartIRC
in file SmartIRC.php, class Net_SmartIRC
    $Id$
Net_SmartIRC
in file SmartIRC.php, method Net_SmartIRC_base::Net_SmartIRC()
    Constructor. Initiales the messagebuffer and "links" the replycodes from global into properties. Also some PHP runtime settings are configured.
Net_SmartIRC_actionhandler
in file SmartIRC.php, class Net_SmartIRC_actionhandler
Net_SmartIRC_base
in file SmartIRC.php, class Net_SmartIRC_base
    main SmartIRC class
Net_SmartIRC_channel
in file SmartIRC.php, class Net_SmartIRC_channel
Net_SmartIRC_channeluser
in file SmartIRC.php, class Net_SmartIRC_channeluser
Net_SmartIRC_data
in file SmartIRC.php, class Net_SmartIRC_data
Net_SmartIRC_Error
in file SmartIRC.php, class Net_SmartIRC_Error
Net_SmartIRC_Error
in file SmartIRC.php, method Net_SmartIRC_Error::Net_SmartIRC_Error()
Net_SmartIRC_irccommands
in file irccommands.php, class Net_SmartIRC_irccommands
    $Id$
Net_SmartIRC_ircuser
in file SmartIRC.php, class Net_SmartIRC_ircuser
Net_SmartIRC_listenfor
in file SmartIRC.php, class Net_SmartIRC_listenfor
Net_SmartIRC_messagehandler
in file messagehandler.php, class Net_SmartIRC_messagehandler
    $Id$
Net_SmartIRC_timehandler
in file SmartIRC.php, class Net_SmartIRC_timehandler
Net_SmartIRC_user
in file SmartIRC.php, class Net_SmartIRC_user
top

o

$object
in file SmartIRC.php, variable Net_SmartIRC_timehandler::$object
$object
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$object
$op
in file SmartIRC.php, variable Net_SmartIRC_channeluser::$op
$ops
in file SmartIRC.php, variable Net_SmartIRC_channel::$ops
op
in file irccommands.php, method Net_SmartIRC_irccommands::op()
    ops an user in the given channel
top

p

part
in file irccommands.php, method Net_SmartIRC_irccommands::part()
    parts from one or more IRC channels with an optional reason
top

q

query_test
in file example.php, method mybot::query_test()
quit
in file irccommands.php, method Net_SmartIRC_irccommands::quit()
    sends QUIT to IRC server and disconnects
top

r

$rawmessage
in file SmartIRC.php, variable Net_SmartIRC_data::$rawmessage
$rawmessageex
in file SmartIRC.php, variable Net_SmartIRC_data::$rawmessageex
$realname
in file SmartIRC.php, variable Net_SmartIRC_user::$realname
$replycodes
in file SmartIRC.php, variable Net_SmartIRC_base::$replycodes
    All IRC replycodes, the index is the replycode name.
$result
in file SmartIRC.php, variable Net_SmartIRC_listenfor::$result
reconnect
in file SmartIRC.php, method Net_SmartIRC_base::reconnect()
    Reconnects to the IRC server with the same login info, it also rejoins the channels
registerActionhandler
in file SmartIRC.php, method Net_SmartIRC_base::registerActionhandler()
    registers a new actionhandler and returns the assigned id
registerTimehandler
in file SmartIRC.php, method Net_SmartIRC_base::registerTimehandler()
    registers a timehandler and returns the assigned id
top

s

$server
in file SmartIRC.php, variable Net_SmartIRC_user::$server
setAutoReconnect
in file SmartIRC.php, method Net_SmartIRC_base::setAutoReconnect()
    Enables/disables autoreconnecting.
setAutoRetry
in file SmartIRC.php, method Net_SmartIRC_base::setAutoRetry()
    Enables/disables autoretry for connecting to a server.
setBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::setBenchmark()
    Enables/disables the benchmark engine.
setChannelSynching
in file SmartIRC.php, method Net_SmartIRC_base::setChannelSynching()
    Deprecated, use setChannelSyncing() instead!
setChannelSyncing
in file SmartIRC.php, method Net_SmartIRC_base::setChannelSyncing()
    Enables/disables channel syncing.
setCtcpVersion
in file SmartIRC.php, method Net_SmartIRC_base::setCtcpVersion()
    Sets the CTCP version reply string.
setDebug
in file SmartIRC.php, method Net_SmartIRC_base::setDebug()
    Sets the level of debug messages.
setDisconnecttime
in file SmartIRC.php, method Net_SmartIRC_base::setDisconnecttime()
    Sets the delaytime before closing the socket when disconnect.
setLogdestination
in file SmartIRC.php, method Net_SmartIRC_base::setLogdestination()
    Sets the destination of all log messages.
setLogfile
in file SmartIRC.php, method Net_SmartIRC_base::setLogfile()
    Sets the file for the log if the destination is set to file.
setReceivedelay
in file SmartIRC.php, method Net_SmartIRC_base::setReceivedelay()
    Sets the delay for receiving data from the IRC server.
setReceiveTimeout
in file SmartIRC.php, method Net_SmartIRC_base::setReceiveTimeout()
    Sets the receive timeout.
setSenddelay
in file SmartIRC.php, method Net_SmartIRC_base::setSenddelay()
    Sets the delay for sending data to the IRC server.
setTopic
in file irccommands.php, method Net_SmartIRC_irccommands::setTopic()
    sets a new topic of a channel
setTransmitTimeout
in file SmartIRC.php, method Net_SmartIRC_base::setTransmitTimeout()
    Sets the transmit timeout.
setUseSockets
in file SmartIRC.php, method Net_SmartIRC_base::setUseSockets()
    Enables/disables the usage of real sockets.
showBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::showBenchmark()
    Shows the benchmark result.
SmartIRC.php
procedural page SmartIRC.php
SMARTIRC_BROWSEROUT
in file defines.php, constant SMARTIRC_BROWSEROUT
SMARTIRC_CRITICAL
in file defines.php, constant SMARTIRC_CRITICAL
SMARTIRC_CRLF
in file defines.php, constant SMARTIRC_CRLF
    $Id$
SMARTIRC_DEBUG_ACTIONHANDLER
in file defines.php, constant SMARTIRC_DEBUG_ACTIONHANDLER
SMARTIRC_DEBUG_ALL
in file defines.php, constant SMARTIRC_DEBUG_ALL
SMARTIRC_DEBUG_CHANNELSYNCING
in file defines.php, constant SMARTIRC_DEBUG_CHANNELSYNCING
SMARTIRC_DEBUG_CONNECTION
in file defines.php, constant SMARTIRC_DEBUG_CONNECTION
SMARTIRC_DEBUG_IRCMESSAGES
in file defines.php, constant SMARTIRC_DEBUG_IRCMESSAGES
SMARTIRC_DEBUG_MESSAGEHANDLER
in file defines.php, constant SMARTIRC_DEBUG_MESSAGEHANDLER
SMARTIRC_DEBUG_MESSAGEPARSER
in file defines.php, constant SMARTIRC_DEBUG_MESSAGEPARSER
SMARTIRC_DEBUG_MESSAGETYPES
in file defines.php, constant SMARTIRC_DEBUG_MESSAGETYPES
SMARTIRC_DEBUG_MODULES
in file defines.php, constant SMARTIRC_DEBUG_MODULES
SMARTIRC_DEBUG_NONE
in file defines.php, constant SMARTIRC_DEBUG_NONE
SMARTIRC_DEBUG_NOTICE
in file defines.php, constant SMARTIRC_DEBUG_NOTICE
SMARTIRC_DEBUG_SOCKET
in file defines.php, constant SMARTIRC_DEBUG_SOCKET
SMARTIRC_DEBUG_TIMEHANDLER
in file defines.php, constant SMARTIRC_DEBUG_TIMEHANDLER
SMARTIRC_DEBUG_USERSYNCING
in file defines.php, constant SMARTIRC_DEBUG_USERSYNCING
SMARTIRC_FILE
in file defines.php, constant SMARTIRC_FILE
SMARTIRC_HIGH
in file defines.php, constant SMARTIRC_HIGH
SMARTIRC_LOW
in file defines.php, constant SMARTIRC_LOW
SMARTIRC_MEDIUM
in file defines.php, constant SMARTIRC_MEDIUM
SMARTIRC_NONE
in file defines.php, constant SMARTIRC_NONE
SMARTIRC_STATE_CONNECTED
in file defines.php, constant SMARTIRC_STATE_CONNECTED
SMARTIRC_STATE_CONNECTING
in file defines.php, constant SMARTIRC_STATE_CONNECTING
SMARTIRC_STATE_DISCONNECTED
in file defines.php, constant SMARTIRC_STATE_DISCONNECTED
SMARTIRC_STDOUT
in file defines.php, constant SMARTIRC_STDOUT
SMARTIRC_SYSLOG
in file defines.php, constant SMARTIRC_SYSLOG
SMARTIRC_TYPE_ACTION
in file defines.php, constant SMARTIRC_TYPE_ACTION
SMARTIRC_TYPE_ALL
in file defines.php, constant SMARTIRC_TYPE_ALL
SMARTIRC_TYPE_BANLIST
in file defines.php, constant SMARTIRC_TYPE_BANLIST
SMARTIRC_TYPE_CHANNEL
in file defines.php, constant SMARTIRC_TYPE_CHANNEL
SMARTIRC_TYPE_CHANNELMODE
in file defines.php, constant SMARTIRC_TYPE_CHANNELMODE
SMARTIRC_TYPE_CTCP
in file defines.php, constant SMARTIRC_TYPE_CTCP
SMARTIRC_TYPE_CTCP_REPLY
in file defines.php, constant SMARTIRC_TYPE_CTCP_REPLY
SMARTIRC_TYPE_CTCP_REQUEST
in file defines.php, constant SMARTIRC_TYPE_CTCP_REQUEST
SMARTIRC_TYPE_ERROR
in file defines.php, constant SMARTIRC_TYPE_ERROR
SMARTIRC_TYPE_INFO
in file defines.php, constant SMARTIRC_TYPE_INFO
SMARTIRC_TYPE_INVITE
in file defines.php, constant SMARTIRC_TYPE_INVITE
SMARTIRC_TYPE_JOIN
in file defines.php, constant SMARTIRC_TYPE_JOIN
SMARTIRC_TYPE_KICK
in file defines.php, constant SMARTIRC_TYPE_KICK
SMARTIRC_TYPE_LIST
in file defines.php, constant SMARTIRC_TYPE_LIST
SMARTIRC_TYPE_LOGIN
in file defines.php, constant SMARTIRC_TYPE_LOGIN
SMARTIRC_TYPE_MODECHANGE
in file defines.php, constant SMARTIRC_TYPE_MODECHANGE
SMARTIRC_TYPE_MOTD
in file defines.php, constant SMARTIRC_TYPE_MOTD
SMARTIRC_TYPE_NAME
in file defines.php, constant SMARTIRC_TYPE_NAME
SMARTIRC_TYPE_NICKCHANGE
in file defines.php, constant SMARTIRC_TYPE_NICKCHANGE
SMARTIRC_TYPE_NONRELEVANT
in file defines.php, constant SMARTIRC_TYPE_NONRELEVANT
SMARTIRC_TYPE_NOTICE
in file defines.php, constant SMARTIRC_TYPE_NOTICE
SMARTIRC_TYPE_PART
in file defines.php, constant SMARTIRC_TYPE_PART
SMARTIRC_TYPE_QUERY
in file defines.php, constant SMARTIRC_TYPE_QUERY
SMARTIRC_TYPE_QUIT
in file defines.php, constant SMARTIRC_TYPE_QUIT
SMARTIRC_TYPE_TOPIC
in file defines.php, constant SMARTIRC_TYPE_TOPIC
SMARTIRC_TYPE_TOPICCHANGE
in file defines.php, constant SMARTIRC_TYPE_TOPICCHANGE
SMARTIRC_TYPE_UNKNOWN
in file defines.php, constant SMARTIRC_TYPE_UNKNOWN
SMARTIRC_TYPE_USERMODE
in file defines.php, constant SMARTIRC_TYPE_USERMODE
SMARTIRC_TYPE_WHO
in file defines.php, constant SMARTIRC_TYPE_WHO
SMARTIRC_TYPE_WHOIS
in file defines.php, constant SMARTIRC_TYPE_WHOIS
SMARTIRC_TYPE_WHOWAS
in file defines.php, constant SMARTIRC_TYPE_WHOWAS
SMARTIRC_UNUSED
in file defines.php, constant SMARTIRC_UNUSED
SMARTIRC_VERSION
in file SmartIRC.php, constant SMARTIRC_VERSION
SMARTIRC_VERSIONSTRING
in file SmartIRC.php, constant SMARTIRC_VERSIONSTRING
startBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::startBenchmark()
    Starts the benchmark (sets the counters).
stopBenchmark
in file SmartIRC.php, method Net_SmartIRC_base::stopBenchmark()
    Stops the benchmark and displays the result.
top

t

$topic
in file SmartIRC.php, variable Net_SmartIRC_channel::$topic
$type
in file SmartIRC.php, variable Net_SmartIRC_actionhandler::$type
$type
in file SmartIRC.php, variable Net_SmartIRC_data::$type
throwError
in file SmartIRC.php, method Net_SmartIRC_base::throwError()
top

u

$users
in file SmartIRC.php, variable Net_SmartIRC_channel::$users
unban
in file irccommands.php, method Net_SmartIRC_irccommands::unban()
    unbans a hostmask on the given channel
unregisterActionhandler
in file SmartIRC.php, method Net_SmartIRC_base::unregisterActionhandler()
    unregisters an existing actionhandler
unregisterActionid
in file SmartIRC.php, method Net_SmartIRC_base::unregisterActionid()
    unregisters an existing actionhandler via the id
unregisterTimeid
in file SmartIRC.php, method Net_SmartIRC_base::unregisterTimeid()
    unregisters an existing timehandler via the id
top

v

$voice
in file SmartIRC.php, variable Net_SmartIRC_channeluser::$voice
$voices
in file SmartIRC.php, variable Net_SmartIRC_channel::$voices
voice
in file irccommands.php, method Net_SmartIRC_irccommands::voice()
    voice a user in the given channel
top

w

who
in file irccommands.php, method Net_SmartIRC_irccommands::who()
    requests a 'WHO' from the specified target
whois
in file irccommands.php, method Net_SmartIRC_irccommands::whois()
    requests a 'WHOIS' from the specified target
whowas
in file irccommands.php, method Net_SmartIRC_irccommands::whowas()
    requests a 'WHOWAS' from the specified target (if he left the IRC network)
top

Documentation generated on Wed, 23 Jul 2003 19:59:07 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/errors.html0000620000175000017500000005424012514342261017275 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Post-parsing
example.php
example2.php
example3.php
example4.php
example5.php
example6.php
example7.php
irccommands.php
messagehandler.php
SmartIRC.php

Post-parsing

Warnings:


Warning - duplicate class element "mybot" in file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example7.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.
Warning - duplicate class element "mybot" in file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example6.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.
Warning - duplicate class element "mybot" in file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example3.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.
Warning - duplicate class element "mybot" in file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example4.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.
Warning - duplicate class element "mybot" in file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example5.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.

defines.php

Warnings:


Warning on line 233 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/SmartIRC/defines.php, assuming package Net_SmartIRC

example.php

Warnings:


Warning on line 30 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 55 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example.php, assuming package Net_SmartIRC

example2.php

Warnings:


Warning on line 52 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example2.php, assuming package Net_SmartIRC

example3.php

Warnings:


Warning on line 30 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 56 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example3.php, assuming package Net_SmartIRC

example4.php

Warnings:


Warning on line 30 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 62 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example4.php, assuming package Net_SmartIRC

example5.php

Warnings:


Warning on line 30 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 55 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example5.php, assuming package Net_SmartIRC

example6.php

Warnings:


Warning on line 30 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 54 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example6.php, assuming package Net_SmartIRC

example7.php

Warnings:


Warning on line 31 - no @package tag was used in a DocBlock for class mybot, assuming package Net_SmartIRC
Warning on line 68 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/examples/example7.php, assuming package Net_SmartIRC

irccommands.php

Warnings:


Warning on line 27 - no @package tag was used in a DocBlock for class Net_SmartIRC_irccommands, assuming package Net_SmartIRC
Warning on line 431 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/SmartIRC/irccommands.php, assuming package Net_SmartIRC

messagehandler.php

Warnings:


Warning on line 27 - no @package tag was used in a DocBlock for class Net_SmartIRC_messagehandler, assuming package Net_SmartIRC
Warning on line 406 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/SmartIRC/messagehandler.php, assuming package Net_SmartIRC

SmartIRC.php

Warnings:


Warning on line 2200 - no @package tag was used in a DocBlock for class Net_SmartIRC, assuming package Net_SmartIRC
Warning on line 2208 - no @package tag was used in a DocBlock for class Net_SmartIRC_data, assuming package Net_SmartIRC
Warning on line 2274 - no @package tag was used in a DocBlock for class Net_SmartIRC_actionhandler, assuming package Net_SmartIRC
Warning on line 2310 - no @package tag was used in a DocBlock for class Net_SmartIRC_timehandler, assuming package Net_SmartIRC
Warning on line 2346 - no @package tag was used in a DocBlock for class Net_SmartIRC_channel, assuming package Net_SmartIRC
Warning on line 2400 - no @package tag was used in a DocBlock for class Net_SmartIRC_user, assuming package Net_SmartIRC
Warning on line 2454 - no @package tag was used in a DocBlock for class Net_SmartIRC_channeluser, assuming package Net_SmartIRC
Warning on line 2472 - no @package tag was used in a DocBlock for class Net_SmartIRC_ircuser, assuming package Net_SmartIRC
Warning on line 2484 - no @package tag was used in a DocBlock for class Net_SmartIRC_listenfor, assuming package Net_SmartIRC
Warning on line 2507 - no @package tag was used in a DocBlock for class Net_SmartIRC_Error, assuming package Net_SmartIRC
Warning on line 2520 - no @package tag was used in a DocBlock for file /var/www/pear/phpdoc/phpdoc/tmp/Net_SmartIRC-0.5.5/SmartIRC.php, assuming package Net_SmartIRC

Documentation generated on by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/index.html0000620000175000017500000027174412514342261017102 0ustar ubuntuubuntu Net_SmartIRC

\

Classes

Net_SmartIRC main SmartIRC class
Net_SmartIRC_channel Struct for individual channel data
Net_SmartIRC_channeluser Struct for extra data that applies to each user in each channel they're in
Net_SmartIRC_data Struct for parsed incoming messages
Net_SmartIRC_Error
Net_SmartIRC_irccommands $Id$ $Revision$ $Author$ $Date$
Net_SmartIRC_ircuser Struct for data that applies to each user server-wide
Net_SmartIRC_listenfor Built-in bot used by Net_SmartIRC::listenFor()
Net_SmartIRC_messagehandler $Id$ $Revision$ $Author$ $Date$
Net_SmartIRC_user Struct for individual user data

Constants

SMARTIRC_ . $value

SMARTIRC_ . $value

SMARTIRC_BROWSEROUT

SMARTIRC_BROWSEROUT

SMARTIRC_CRITICAL

SMARTIRC_CRITICAL

SMARTIRC_CRLF

SMARTIRC_CRLF

$Id$ $Revision$ $Author$ $Date$

Copyright (c) 2002-2004 Mirco Bauer meebey@meebey.net http://www.meebey.net

Full LGPL License: http://www.gnu.org/licenses/lgpl.txt

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

SMARTIRC_DEBUG_ACTIONHANDLER

SMARTIRC_DEBUG_ACTIONHANDLER

SMARTIRC_DEBUG_ALL

SMARTIRC_DEBUG_ALL

SMARTIRC_DEBUG_CHANNELSYNCING

SMARTIRC_DEBUG_CHANNELSYNCING

SMARTIRC_DEBUG_CONNECTION

SMARTIRC_DEBUG_CONNECTION

SMARTIRC_DEBUG_DCC

SMARTIRC_DEBUG_DCC

SMARTIRC_DEBUG_IRCMESSAGES

SMARTIRC_DEBUG_IRCMESSAGES

SMARTIRC_DEBUG_MESSAGEHANDLER

SMARTIRC_DEBUG_MESSAGEHANDLER

SMARTIRC_DEBUG_MESSAGEPARSER

SMARTIRC_DEBUG_MESSAGEPARSER

SMARTIRC_DEBUG_MESSAGETYPES

SMARTIRC_DEBUG_MESSAGETYPES

SMARTIRC_DEBUG_MODULES

SMARTIRC_DEBUG_MODULES

SMARTIRC_DEBUG_NONE

SMARTIRC_DEBUG_NONE

SMARTIRC_DEBUG_NOTICE

SMARTIRC_DEBUG_NOTICE

SMARTIRC_DEBUG_SOCKET

SMARTIRC_DEBUG_SOCKET

SMARTIRC_DEBUG_TIMEHANDLER

SMARTIRC_DEBUG_TIMEHANDLER

SMARTIRC_DEBUG_USERSYNCING

SMARTIRC_DEBUG_USERSYNCING

SMARTIRC_FILE

SMARTIRC_FILE

SMARTIRC_HIGH

SMARTIRC_HIGH

SMARTIRC_LOW

SMARTIRC_LOW

SMARTIRC_MEDIUM

SMARTIRC_MEDIUM

SMARTIRC_NONE

SMARTIRC_NONE

SMARTIRC_STATE_CONNECTED

SMARTIRC_STATE_CONNECTED

SMARTIRC_STATE_CONNECTING

SMARTIRC_STATE_CONNECTING

SMARTIRC_STATE_DISCONNECTED

SMARTIRC_STATE_DISCONNECTED

SMARTIRC_STDOUT

SMARTIRC_STDOUT

SMARTIRC_SYSLOG

SMARTIRC_SYSLOG

SMARTIRC_TYPE_ACTION

SMARTIRC_TYPE_ACTION

SMARTIRC_TYPE_ALL

SMARTIRC_TYPE_ALL

SMARTIRC_TYPE_BANLIST

SMARTIRC_TYPE_BANLIST

SMARTIRC_TYPE_CHANNEL

SMARTIRC_TYPE_CHANNEL

SMARTIRC_TYPE_CHANNELMODE

SMARTIRC_TYPE_CHANNELMODE

SMARTIRC_TYPE_CTCP

SMARTIRC_TYPE_CTCP

SMARTIRC_TYPE_CTCP_REPLY

SMARTIRC_TYPE_CTCP_REPLY

SMARTIRC_TYPE_CTCP_REQUEST

SMARTIRC_TYPE_CTCP_REQUEST

SMARTIRC_TYPE_ERROR

SMARTIRC_TYPE_ERROR

SMARTIRC_TYPE_INFO

SMARTIRC_TYPE_INFO

SMARTIRC_TYPE_INVITE

SMARTIRC_TYPE_INVITE

SMARTIRC_TYPE_JOIN

SMARTIRC_TYPE_JOIN

SMARTIRC_TYPE_KICK

SMARTIRC_TYPE_KICK

SMARTIRC_TYPE_LIST

SMARTIRC_TYPE_LIST

SMARTIRC_TYPE_LOGIN

SMARTIRC_TYPE_LOGIN

SMARTIRC_TYPE_MODECHANGE

SMARTIRC_TYPE_MODECHANGE

SMARTIRC_TYPE_MOTD

SMARTIRC_TYPE_MOTD

SMARTIRC_TYPE_NAME

SMARTIRC_TYPE_NAME

SMARTIRC_TYPE_NICKCHANGE

SMARTIRC_TYPE_NICKCHANGE

SMARTIRC_TYPE_NONRELEVANT

SMARTIRC_TYPE_NONRELEVANT

SMARTIRC_TYPE_NOTICE

SMARTIRC_TYPE_NOTICE

SMARTIRC_TYPE_PART

SMARTIRC_TYPE_PART

SMARTIRC_TYPE_QUERY

SMARTIRC_TYPE_QUERY

SMARTIRC_TYPE_QUIT

SMARTIRC_TYPE_QUIT

SMARTIRC_TYPE_TOPIC

SMARTIRC_TYPE_TOPIC

SMARTIRC_TYPE_TOPICCHANGE

SMARTIRC_TYPE_TOPICCHANGE

SMARTIRC_TYPE_UNKNOWN

SMARTIRC_TYPE_UNKNOWN

SMARTIRC_TYPE_USERMODE

SMARTIRC_TYPE_USERMODE

SMARTIRC_TYPE_WHO

SMARTIRC_TYPE_WHO

SMARTIRC_TYPE_WHOIS

SMARTIRC_TYPE_WHOIS

SMARTIRC_TYPE_WHOWAS

SMARTIRC_TYPE_WHOWAS

SMARTIRC_UNUSED

SMARTIRC_UNUSED

SMARTIRC_VERSION

SMARTIRC_VERSION

SMARTIRC_VERSIONSTRING

SMARTIRC_VERSIONSTRING

Net_SmartIRC-1.1.7/docs/HTML/li_Net_SmartIRC.html0000620000175000017500000005245212514342261020702 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



Package Net_SmartIRC



Documentation generated on Wed, 23 Jul 2003 19:59:08 +0200 by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/ric_CHANGELOG.html0000620000175000017500000007026312514342261020110 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



CHANGELOG

/**
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 */

v0.5.5:
-------
fixes:
 - fixed a bug in _rawreceive()
   messages were parsed wrong which caused problems with kick reasons.
   (thx to sniper for reporting this).
 - fixed bug in message()
   CTCP ACTION messages had missing \001 at the end.
 - fixed a bug in quit(), which caused quit messages not to be sent to the server.
 - fixed reconnect() bug, it sent the channel join requests right after connect(),
   and tried to join a channel without a name.
 - fixes in ChannelSync code
   When a user joins a channel after SmartIRC, no WHO info is updated in the user object.
   Fixed wrong update of channel mode when rpl_channelmodeis received.
   Fixed bug in _mode() method, which caused wrong handling of mode changes.
   Topic updates are now tracked (thanks to sniper).
   Fixed bug which caused fatal errors with ChannelSync enabled
   (closes sf.net bug  #705269).
   Fixed bug in _event_mode(), unhandled modes were stored wrong.
   Fixed bug in _event_rpl_namreply(), which caused that the first char of the first nick
   of a namreply got cut (closes sf.net bug #747832).
 - fixed bug in _checktimer()
   Which caused problems when a timehandler is unregistered.
 - fixed _gettye()
   It wasn't recognizing SMARTIRC_TYPE_ACTION.
 - removed if(!$obj) check for newly created objects (closes PHP bug #24622),
   required for PHP 4.1.2 compatibility.

changes:
 - removed all irc commands from SmartIRC.php
   they have now their own file (SmartIRC/irccommands.php).
 - Net_SmartIRC_messagehandler class now extends Net_SmartIRC_irccommands.
 - removed the 1. parameter (&$irc) of all message handlers, not needed anymore.
 - renamed class Net_SmartIRC_user to Net_SmartIRC_channeluser,
   added class Net_SmartIRC_ircuser.
 - added prefix _event to all message handlers (needed because of class restructuring).
 - tweaked filling of the ircdata objects.
 - log() now checks the passed debug level bitwise.
 - $data->message will be null instead of random garbage,
   if the IRC message has no colon (the message part),
 - All methods that depend on ChannelSync mode, checks if it's enabled.
 - Optimized the usage of time() for $this->_lastrx.
 - updated the URL of a SmartIRC based bot (atbs).
 - _loggedin is now set to false when the socket is dead,
   required for proper working  reconnect().
 - on a reconnect(), the logfile won't be overwritten anymore.
 - updated phpdoc tags.
 - all access to the channel array now uses strtolower() for the key.
 - fixed typo in function name setChannelSynching(),
   now it's called setChannelSyncing() with a BC wrapper.
 - removed all SMARTIRC_ prefixes for debug output.
 - changed isJoined($channel) to isJoined($channel, $nickname)
   for checking if the specified user is joined.
 - removed "destructors", because they don't free the memory.

new:
 - added isOpped() isVoiced() isBanned().
 - added debug output and debug level for the messageparser.
 - reconnect() uses now the channel key if one exists.
 - added channel key syncing in _mode().
 - when an actionhandler message regex has a leading '/' then the regex is used as it is,
   this allows complex perl regex's.
 - added message type SMARTIRC_TYPE_CTCP_REQUEST and SMARTIRC_CTCTP_REPLY for more advanced CTCP.
 - added new log destinations SMARTIRC_NONE and SMARTIRC_BROWSEROUT
   (for firendly browserouput). When the script is called from a browser,
   the BROWSEROUT will automatic be used (closed sf.net bug #708155).
 - added error handling for socket_select() in _rawreceive().
 - added getMessage() to Net_SmartIRC_Error class.
 - added debug level for ChannelSync code (SMARTIRC_DEBUG_CHANNELSYNCING).
 - added filename and linenumber to debug output.
 - added key property to channel class.
 - added to all IRC commands optional $priority parameter with default value SMARTIRC_MEDIUM.
 - added isError() for more advanced errorhandling, needed for encapsulation.
 - added _isValidType() method, which checks for valid SMARTIRC_TYPE_* types.

v0.5.1
------
fixes:
 - major bugs in ChannelSynching fixed.
 - fsocks support fixed.
 - setUseSocket() method fixed.
   If false was passed as parameter, it tried to load the socket extension.
   Also warnings are now suppressed with @ in front of dl().
 - fixed a typo in reconnect().
 - missing SMARTIRC_DEBUG_CHANNELSYNCHING constant added.
 
changes:
 - new design for HTML documentation used (PEAR template).
 - moved all examples to their own directory (examples/).
 - moved the documentation to docs/HTML/.
 - added new file descriptions to README.
 - removed not needed parts of DOCUMENTATION (most is now in the HTML version).
 - updated the HTML documentation.
 
new:
 - example5/6/7.php added.
 - setAutoRetry() method added.
   Autoretrying of connecting to the IRC server, is now supported.
 
v0.5.0
------
fixes:
 - fixed critical bug in the main _rawreceive() for() loop, messages were lost.

changes:
 - License changed from GPL to LGPL.
 - updated in all files the copyright year.
 - changed documentation tags in front of all methods to the phpDocumentator compatible format.
 - improved connect() errorhandling.
 - changed login() parameters to $nick, $realname, $usermode = 0, $username = null, $password = null.
 - changed join() parameters to $channelarray, $key = null.
 - changed kick() parameters to $channel, $nicknamearray, $reason = null.
 - changed listenFor() parameters to $messagetype
   return value is now the result, instead the of a reference to the result parameter.
 - sendbuffer has now 3 queues: high, medium and low
   high sends 2 messages, then 1 of medium
   low is only send if high _and_ medium is empty.
 - select() call for sockets is strongly optimized

new:
 - phpDocumentator package tags.
 - include() for messagehandler.php (needed for the new API).
 - setChannelSynching() method, for enabling the channel synching.
 - setCtcpVersion() method, for changing the ctcp version reply string.
 - setReceiveTimeout() method, for changing the receive timeout.
 - setTransmitTimeout() method, for changing the transmit timeout.
 - setAutoReconnect() method, for enabling the autoreconnect feature.
 - channel variable, a reference to _channels because $object->channel("#chan")->topic is not possible in PHP4 (ZE1).
 - reconnect() method, it will reconnect and also join all channels.
 - channel() method, getting a reference to the channel, only if channelsynching is on.
 - added ident, host, messageex and rawmessageex variables to the Net_SmartIRC_data class.
 - class Net_SmartIRC_user, stores info about one user, only used if channelsynching is on.
 - class Net_SmartIRC_channel, stores info about one channel, only used if channelsynching is on.

v0.4.0
------
* phpSmartIRCclass.inc.php:
 - fixed serious socket bug
   The buffer of the socket got full because only 512 bytes were read at once,
   which caused losing some IRC messages that are comming fast like the MOTD.
   Now it will read 10240 bytes at once, and doesn't loose any IRC message.
 - fixed sendbuffer
   The sendbuffer will only be sent, when the class is fully connected and
   registered on the IRC network. Before if a nickname collision happened,
   all sent IRC commands from the buffer were ignored by the IRC server.
 - fixed socket status
   Socket handling is now compatible with PHP 4.3 dev.
 - fixed $_nick
   When the nickname got changed because of nickname is already in use,
   $_nick  will be updated. (thanks for the hint to Andreas Streichardt).
 - fixed actionhandler ids (unregister caused that the other ids were  changed).
 - fixed TYPE_TOPIC to the right bitoperator value.
 - added a reference to the IRC class in actionhandler callbacks
   WARNING: all user writtin methods have to be changed!!
   method( &$data ) _has to be changed_ to method( &$irc, &$data )
   If you don't change those, your IRC scripts will _not_ work anymore!
 - changed internal methodnames to _methodname
 - changed sendbuffer
   Now it uses configurable senddelay, instead of static 2 messages  
   per second (send flood protection).
 - changed TYPEs
   All TYPE_* are now bitwise constants, register_actionhandler() can now
   react to more than one message type.
 - added TYPE_ACTION for those common /me messages.
 - added timeevents   Added method register_timehandler()
   unregister_timeid() and   reordertimehandler(). Those timehandler
   can be used to call methods in specified intervalls, e.g. for
   timeevents. Added needed class CphpSmartIRCclass_timehandler.
 - moved all IRC related defines to defines.inc.php.
 - changed if() elseif() structures where possible to switch() for
   clearer/faster code.
 - added more debug messages for actionhandler.
 - added unregister_actionhandler() and unregister_actionid() method.
   Also added needed reorderactionhandler(), which is called after an
   unregister methods was called.
 - added $data->channel to actionhandler callback.

* defines.inc.php:
 - initial import. 
 - now all IRC related defines are now in this file instead of
   phpSmartIRCclass.inc.php.

* DOCUMENTATION:
 - updated/added methods description

* example.php:
 - changed user function parameter to new style ( &$irc and &$data ).
 - added TYPE_NOTICE to query_test example.

v0.3.2
------
* phpSmartIRCclass.inc.php:
 - Replaced all quotes by single quote where possible for speedup.
 - Added _disconnecttime for doing a clean IRC quit.
 - Added Zend IDE style documentation for parameter variables types
   and method descriptions.
 - Spaces in nickname and username will be automaticly removed.
 - Nicknamecollisions are automaticly detected and nickname will be
   changed to nickname with 3 random numbers.
 - New method nicknameuse().
 - Fixed a serious fsock bug.
 - Added new type TYPE_ERROR.
 - Fixed wrong usage of & when calling methods with params that are
   called by reference.
 - Fixed a debug message "DEBUG: disconnected", now it will only
   occur when debug mode is enabled.
 - listen_for() will now do a quickdisconnect, for a big speedup.
 - Changed logging system, now with debug levels, default is
   DEBUG_NOTICE.
 - Added benchmark system, now its possible to time things for doing
   optimizations.
 - New methods: benchmark(), benchmarktstart(), benchmarkend()
   and show_benchmark() for the benchmark system
 - Added microint(), for getting the microtime as float, needed for
   the benchmarks.
 - Added a couple of log() calls, for different debug levels.
 - fsockets now runs in non blocking mode, because of broken?
   getstatus for fsockets.
 - Added mode() method, for chaning modes of a user or channel.
 - Added op() and deop() method.  Added ban() and unban() method
   (thx for diff file to Peter Petermann).

* DOCUMENTATION:
 - added documentation for new logging system
 - added the whole DEBUG_* list

* HOWTO:
 - changed parameter description for debug()

* example.php:
 - replaced all quotes by singlequotes where possible.
 - fixed wrong usage of message()

* example2.php:
 - replaced all quotes by singlquotes where possible.
 - added benchmark test to the example

v0.3.0
-----
* phpSmartIRCclass.inc.php:
 - added "Ping? Pong!" log message for debugging
 - added real linux/windows syslog logging
   to setlogdestination().
 - new method listen_for() makes it possible
   to show irc related information on a homepage, like how many users
   on a channel are.

* HOWTO:
 - added how to run/call the selfwritten bot

* DOCUMENTATION:
 - added (missing) explaination for new methods

* example2.php:
 - new examplefile with the new listen_for() method

v0.2.6
------
* phpSmartIRCclass.inc.php:
 - phpSmartIRCclass.inc renamed to
   phpSmartIRCclass.inc.php because of security reasons
 - changed function_exists() to get_loaded_extensions() for
   checking if the PHP build has real socket support
 - log() changed to create Linux style formated logs
 - new methods for logging (daemon style)
   log() for add log entries setlogdestination() can be STDOUT or FILE
   setlogfile() sets the file
 - changed received data processing in rawreceive()

* HOWTO:
 - added a mini howto for using the class

* DOCUMENTATION:
 - added class documentation of the project

* CREDITS:
 - added credits file

v0.2.5
------
- improved socket handling
- bufferedsend fix
- new version number system
- cpu usage reduced
- added changelog file


Documentation generated on by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/HTML/ric_README.html0000620000175000017500000004374512514342261017563 0ustar ubuntuubuntu PEAR API Documentation :: Net_SmartIRC
PEAR   PEAR API Documentation :: Net_SmartIRC Package Homepage |  Download ApiDoc  

Packages:



README

/**
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 */

Net_SmartIRC
----------------
What is this?
Net_SmartIRC is a PHP class for communication with IRC networks, which
conforms to the RFC 2812 (IRC Protocol). It's an API that handles all IRC
protocol messages. It is designed for creating IRC bots, chats and show irc
related info on webpages.

Please report bugs to:
http://sourceforge.net/tracker/?group_id=60664&atid=494859

Project Homepage:
http://sourceforge.net/projects/phpsmartirc

official PEAR package page:
http://pear.php.net/package-info.php?package=Net_SmartIRC

files included in SmartIRC
--------------------------
SmartIRC.php
The class itself.

FEATURES
A full list of features that SmartIRC includes

CHANGELOG
Listing of changes between all versions.

README
this file

LICENSE
The license of Net_SmartIRC.

CREDITS
Creditlist with people that work/help on Net_SmartIRC.

SmartIRC/
 defines.php
 Nessesary IRC related defines (IRC reply codes).

 messagehandler.php
 All defined messagehandler that SmartIRC currently uses for channelsynching
 and some other API handling.

 irccommands.php
 All supported IRC commands (like join/part/kick/etc..)

docs/
 DOCUMENTATION
 Appendix to the HTML documention for developers.

 HOWTO
 Mini howto with detailed information, step by step.

 HTML/
  index.html
  the full documenation of SmartIRC

examples/
 example.php
 An example of how you can use this class for a mini php bot.

 example2.php
 This example shows how to display the amount of users in a specific
 IRC channel on your homepage.

 example3.php
 This bot echos the oplist if !ops is said on the channel.

 example4.php
 This bot checks all realnames of people that are on the channel
 and displays the result.
 
 example5.php
 This bot can kicks users when !kick NICKNAME is said on the channel.
 
 example6.php
 This example shows how an onjoin greeting can be done with SmartIRC.
 
 example7.php
 This is an example how timers can be used and how to unregister them.


Documentation generated on by phpDocumentor 1.2.0beta1c
HTML layout done by Christian Dickmann and originally inspired by PHPEdit
Net_SmartIRC-1.1.7/docs/examples/example.php0000600000175000017500000000475012514342261020310 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot which could be written include_once('Net/SmartIRC.php'); class Net_SmartIRC_module_MyBot { public $name = 'MyBot'; public $description = 'My custom bot with two action handlers'; public $author = 'My Name'; public $license = 'LGPL'; private $irc; private $handlerids; public function __construct($irc) { $this->irc = $irc; $this->handlerids = array( $irc->registerActionHandler(SMARTIRC_TYPE_QUERY|SMARTIRC_TYPE_NOTICE, '^test', $this, 'query_test'), $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^test', $this, 'channel_test'), ); } public function __destruct() { $this->irc->unregisterActionId($this->handlerids); } public function channel_test($irc, $data) { $irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, $data->nick.': I dont like tests!'); } public function query_test($irc, $data) { // result is sent to #smartirc-test $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', $data->nick.' said "'.$data->message.'" to me!'); $irc->message(SMARTIRC_TYPE_QUERY, $data->nick, 'I told everyone on #smartirc-test what you said!'); } } $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, )); $irc->loadModule('MyBot') ->connect('chat.freenode.net', 6667) ->login('Net_SmartIRC', 'example.php', 0, 'Net_SmartIRC') ->join(array('#smartirc-test')) ->listen() ->disconnect(); Net_SmartIRC-1.1.7/docs/examples/example2.php0000600000175000017500000000340512514342261020366 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how you could show on your homepage how many users are in a specific channel include_once('Net/SmartIRC.php'); $irc = new Net_SmartIRC(); $irc->startBenchmark(); $irc->setDebugLevel(SMARTIRC_DEBUG_ALL); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example2.php)', 0, 'Net_SmartIRC'); $irc->getList('#php'); $resultarr = $irc->listenFor(SMARTIRC_TYPE_LIST); $irc->disconnect(); $irc->setBenchmark(true); $irc->stopBenchmark(); if (is_array($resultarr)) { $ircdata = $resultarr[0]; $count = $ircdata->rawmessageex[4]; ?> On the IRC Channel #php are Users An error occured, please check the specified server and settings * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot could be written include_once('Net/SmartIRC.php'); class MyBot { private $irc; private $handlerid; public function __construct($irc) { $this->irc = $irc; $this->handlerid = $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^!ops', $this, 'op_list'); } public function __destruct() { $this->irc->unregisterActionId($this->handlerid); } public function op_list($irc, $data) { $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', 'ops on this channel are:'); // Here we're going to get the Channel Operators, the voices and users // method is available too, e.g. $irc->getChannel('#test')->users will // return all of the channel's users. $oplist = implode(' ', array_keys($irc->getChannel('##fix_your_mind')->ops)); // result is sent to the channel $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', $oplist); } } // Using Channel Syncing we will track all users on all channels we are joined $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, 'ChannelSyncing' => true, )); $bot = new MyBot($irc); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example3.php)', 8, 'Net_SmartIRC'); $irc->join(array('#smartirc-test','#test')); $irc->listen(); $irc->disconnect(); Net_SmartIRC-1.1.7/docs/examples/example4.php0000600000175000017500000000544112514342261020372 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot could be written include_once('Net/SmartIRC.php'); class MyBot { private $irc; private $handlerid; public function __construct($irc) { $this->irc = $irc; $this->handlerid = $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^!realnamecheck', $this, 'realname_check'); } public function __destruct() { $this->irc->unregisterActionId($this->handlerid); } public function realname_check($irc, $data) { // lets loop through all user that are on the #test channel // result is send to #smartirc-test (we don't want to spam #test) foreach ($irc->channel['#test']->users as $value) { $nickname = $value->nick; $realname = $value->realname; // lets match against this realname regex, which wants (capital-letter) *(small-letter) (space) (capital-letter) *(small-letter) if (preg_match('/^[A-Z][a-z]+ ([A-Z][a-z]+(\-[A-Z][a-z]+)?)+/', $realname) == 0) { $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', $nickname.' has not valid realname! ('.$realname.')'); } else { $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', $nickname.' approved ('.$realname.')'); } } $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', ''); } } // activating the channel syncing is important, or we won't have $irc->channel[] available $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, 'ChannelSyncing' => true, )); $bot = new MyBot($irc); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example4.php)', 8, 'Net_SmartIRC'); $irc->join(array('#smartirc-test','#test')); $irc->listen(); $irc->disconnect(); Net_SmartIRC-1.1.7/docs/examples/example5.php0000600000175000017500000000420312514342261020366 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot could be written include_once('Net/SmartIRC.php'); class MyBot { private $irc; private $handlerid; public function __construct($irc) { $this->irc = $irc; $this->handlerid = $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^!kick', $this, 'kick'); } public function __destruct() { $this->irc->unregisterActionId($this->handlerid); } public function kick($irc, $data) { // we need the nickname parameter if(isset($data->messageex[1])) { $nickname = $data->messageex[1]; $channel = $data->channel; $irc->kick($channel, $nickname); } else { $irc->message($data->type, $data->nick, 'wrong parameter count'); $irc->message($data->type, $data->nick, 'usage: !kick $nickname'); } } } $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, )); $bot = new MyBot($irc); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example5.php)', 8, 'Net_SmartIRC'); $irc->join('#test'); $irc->listen(); $irc->disconnect(); Net_SmartIRC-1.1.7/docs/examples/example6.php0000600000175000017500000000411312514342261020367 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot could be written include_once('Net/SmartIRC.php'); class MyBot { private $irc; private $handlerid; public function __construct($irc) { $this->irc = $irc; $this->handlerid = $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '.*', $this, 'onjoin_greeting'); } public function __destruct() { $this->irc->unregisterActionId($this->handlerid); } public function onjoin_greeting($irc, $data) { // if _we_ join, don't greet ourself // then check if this is the right channel if (!$irc->isMe($data->nick) && $data->channel == '#test') { // it is, lets greet the joint user $irc->message(SMARTIRC_TYPE_CHANNEL, '#test', 'hi '.$data->nick); } } } $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, )); $bot = new MyBot($irc); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example6.php)', 8, 'Net_SmartIRC'); $irc->join(array('#smartirc-test','#test')); $irc->listen(); $irc->disconnect(); Net_SmartIRC-1.1.7/docs/examples/example7.php0000600000175000017500000000526112514342261020375 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // ---EXAMPLE OF HOW TO USE Net_SmartIRC--- // this code shows how a mini php bot could be written include_once('Net/SmartIRC.php'); class MyBot { private $irc; private $actionid; private $timeids; public function __construct($irc) { $this->irc = $irc; $this->timeids = array( // register saytime() to be called every 30 sec. (30,000 milliseconds) $irc->registerTimeHandler(30000, $this, 'saytime'), // register saytime_once() to be called in 10 sec. (10,000 milliseconds) and save the assigned id // which is needed for unregistering the timehandler. $irc->registerTimeHandler(10000, $this, 'saytime_once'), ); $this->actionid = $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^!quit', $this, 'quit'); } public function __destruct() { $this->irc->unregisterActionId($this->actionid); $this->irc->unregisterTimeId($this->timeids); } public function saytime_once($irc) { $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', '(once) the time is: '.date('H:i:s')); $irc->unregisterTimeId($this->timeids[1]); unset($this->timeids[1]); } public function saytime($irc) { $irc->message(SMARTIRC_TYPE_CHANNEL, '#smartirc-test', 'the time is: '.date('H:i:s')); } public function quit($irc) { $irc->quit("time to say goodbye..."); } } $irc = new Net_SmartIRC(array( 'DebugLevel' => SMARTIRC_DEBUG_ALL, )); $bot = new MyBot($irc); $irc->connect('chat.freenode.net', 6667); $irc->login('Net_SmartIRC', 'Net_SmartIRC Client '.SMARTIRC_VERSION.' (example7.php)', 8, 'Net_SmartIRC'); $irc->join(array('#smartirc-test','#test')); $irc->listen(); $irc->disconnect(); Net_SmartIRC-1.1.7/docs/DOCUMENTATION0000620000175000017500000000515212514342261016261 0ustar ubuntuubuntu/** * $Id$ * $Revision$ * $Author$ * $Date$ * * Copyright (c) 2002-2003 Mirco "MEEBEY" Bauer * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ API Documention of SmartIRC ------------------------------- Contents: - Message Types - Debug Levels Message Types: -------------- For RegisterActionhandler() and message() you pass a message type. The IRC protocol defines different kinds of messages. I don't cover all of them because there are just too many of them. RegisterActionhandler() uses bitwise constats, eg. SMARTIRC_TYPE_QUERY|SMARTIRC_TYPE_NOTICE would match if the message is SMARTIRC_TYPE_QUERY _or_ SMARTIRC_TYPE_NOTICE. SmartIRC supports currently the following message types: SMARTIRC_TYPE_UNKNOWN SMARTIRC_TYPE_CHANNEL SMARTIRC_TYPE_QUERY SMARTIRC_TYPE_CTCP SMARTIRC_TYPE_CTCP_REQUEST SMARTIRC_TYPE_CTCP_REPLY SMARTIRC_TYPE_NOTICE SMARTIRC_TYPE_WHO SMARTIRC_TYPE_JOIN SMARTIRC_TYPE_INVITE SMARTIRC_TYPE_ACTION SMARTIRC_TYPE_TOPICCHANGE SMARTIRC_TYPE_NICKCHANGE SMARTIRC_TYPE_KICK SMARTIRC_TYPE_QUIT SMARTIRC_TYPE_LOGIN SMARTIRC_TYPE_INFO SMARTIRC_TYPE_LIST SMARTIRC_TYPE_NAME SMARTIRC_TYPE_MOTD SMARTIRC_TYPE_MODECHANGE SMARTIRC_TYPE_PART SMARTIRC_TYPE_ERROR SMARTIRC_TYPE_BANLIST SMARTIRC_TYPE_TOPIC SMARTIRC_TYPE_NONRELEVANT SMARTIRC_TYPE_WHOIS SMARTIRC_TYPE_WHOWAS SMARTIRC_TYPE_USERMODE SMARTIRC_TYPE_CHANNELMODE SMARTIRC_TYPE_CTCP_REQUEST SMARTIRC_TYPE_CTCP_REPLY Debug Levels: ------------ Here the list of avialable debug levels, used for the setDebug() setting and log() method: 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_CHANNELSYNCHING SMARTIRC_DEBUG_MODULES SMARTIRC_DEBUG_USERSYNCING SMARTIRC_DEBUG_MESSAGEPARSER SMARTIRC_DEBUG_ALL Net_SmartIRC-1.1.7/docs/HOWTO0000620000175000017500000001206112514342261015145 0ustar ubuntuubuntu/** * $Id$ * $Revision$ * $Author$ * $Date$ * * Copyright (c) 2002-2003 Mirco "MEEBEY" Bauer * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Mini-HowTo for Net_SmartIRC ------------------------------- Contents - Write your bot methods - Creating an object of Net_SmartIRC - Get Net_SmartIRC set up right - Register actionhandlers for your bot methods - Get things happen - Test the bot - Smart words Here is a guide for setting up the Net_SmartIRC and using it for a little IRC bot. ie.. You want to create a bot that reacts when the message in a channel is "!test". Write your bot methods: ---------------------- First you have to write your methods that will be executed when the event ("!test") happens. The imported thing is that the methods you write have to be methods in a class, since PHP doesn't allow references to normal PHP functions, only to objects... All methods you write have to have _2_ parameters and use a '&' in front of the variable name. With "function yourfunction( &$irc, &$data )" you are on the good side. The objectname for Net_SmartIRC we use in this howto is $irc After your class, you must make a object out of it, so Net_SmartIRC can call later your defined methods. Example: class MyBot { function test_command(&$irc, &$data) { $irc->message(SMARTIRC_TYPE_CHANNEL, '#bots', $data->nick.': no I don't like tests!'); } } $mybot = new mybot(); this will send a channel message to the #bots channel and will tell the guy who said !test, that the bot doesn't like tests.. Creating an object of Net_SmartIRC: ------------------------------------ If you want to use Net_SmartIRC for your program/script you first have to create a object of the class before you can use the methods or the class itself. Here is an example: include('Net/SmartIRC.php'); $irc = new Net_SmartIRC(); now you can call the methods of the class, with $irc->METHODNAME.... Get Net_SmartIRC set up right: ------------------------------- Before you can let the Net_SmartIRC do the IRC handling for you, you first have to tell it which server, username, realname etc.. if you want to use real sockets instead of fsocks you would do this (highly recommend): $irc->setUseSockets(true); and if you want to bind your real socket connection to use only one IP on a machine with more than one of them, follow that with: $irc->setBindAddress('192.168.0.1'); -or- $irc->setBindAddress('192.168.0.1',57943); if you want to bind a port as well. Of course, use your own IP and port as those are just examples. or if you want to get debug messages for testing: $irc->setDebug(SMARTIRC_DEBUG_ALL); for all settings see the DOCUMENTATION file. Register actionhandlers for your bot methods: ----------------------------------------- You have a !test method but no relation to Net_SmartIRC yet. All your bot methods must be registered, or they won't be called, because Net_SmartIRC doesn't know them... logical... The test_command() method should be called when someone says "!test" in the channels where the bot is. Here is an example: $irc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '!test', &$mybot, 'test_command'); This tells Net_SmartIRC to call method called "test_command" from the object $mybot, when a message in a channel is "!test"... There are also different message types. These you will find in DOCUMENTATION Ok now we have everything ready to go! Get things happening: ------------------- connect to the IRC server and port: $irc->connect('irc.server.net', 6667); login with nickname, realname, usermode, username: $irc->login('MyBot', 'MyBotty Bot', 0,'MyBotty'); let the bot join a channel $irc->join('#bots'); now wait for the actionhandlers to happen, or idle: $irc->listen(); If the function listen() will return because of a return signal, then we should make a clean disconnect from the IRC server. $irc->disconnect(); Test the bot: ----------- Spawn the bot with this command "php yourbot.php" (assumes that you have the CGI/CLI version of PHP) Now just join the same IRC server that the bot is on and goto #bots and say !test You should get the "yourNickname: I don't like test" reply from your bot, yeah thats it... pretty easy if you wrote some methods... Smart words: ----------- And don't forget, all people on IRC are humans like you and me, be friendly and respect everyone like you want to be respected! Net_SmartIRC-1.1.7/Net/SmartIRC/defines.php0000600000175000017500000003570112514342261017676 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // don't change this! unless you know what you do define('SMARTIRC_CRLF', "\r\n"); define('SMARTIRC_UNUSED', '*'); define('SMARTIRC_STDOUT', 0); define('SMARTIRC_FILE', 1); define('SMARTIRC_SYSLOG', 2); define('SMARTIRC_BROWSEROUT', 3); define('SMARTIRC_NONE', 4); define('SMARTIRC_LOW', 0); define('SMARTIRC_MEDIUM', 1); define('SMARTIRC_HIGH', 2); define('SMARTIRC_CRITICAL', 3); define('SMARTIRC_STATE_DISCONNECTED', 0); define('SMARTIRC_STATE_CONNECTING', 1); define('SMARTIRC_STATE_CONNECTED', 2); define('SMARTIRC_DEBUG_NONE', 0); define('SMARTIRC_DEBUG_NOTICE', 1); define('SMARTIRC_DEBUG_CONNECTION', 2); define('SMARTIRC_DEBUG_SOCKET', 4); define('SMARTIRC_DEBUG_IRCMESSAGES', 8); define('SMARTIRC_DEBUG_MESSAGETYPES', 16); define('SMARTIRC_DEBUG_ACTIONHANDLER', 32); define('SMARTIRC_DEBUG_TIMEHANDLER', 64); define('SMARTIRC_DEBUG_MESSAGEHANDLER', 128); define('SMARTIRC_DEBUG_CHANNELSYNCING', 256); define('SMARTIRC_DEBUG_MODULES', 512); define('SMARTIRC_DEBUG_USERSYNCING', 1024); define('SMARTIRC_DEBUG_MESSAGEPARSER', 2048); define('SMARTIRC_DEBUG_DCC', 4096); define('SMARTIRC_DEBUG_ALL', 8191); define('SMARTIRC_TYPE_UNKNOWN', 1); define('SMARTIRC_TYPE_CHANNEL', 2); define('SMARTIRC_TYPE_QUERY', 4); define('SMARTIRC_TYPE_CTCP', 8); define('SMARTIRC_TYPE_NOTICE', 16); define('SMARTIRC_TYPE_WHO', 32); define('SMARTIRC_TYPE_JOIN', 64); define('SMARTIRC_TYPE_INVITE', 128); define('SMARTIRC_TYPE_ACTION', 256); define('SMARTIRC_TYPE_TOPICCHANGE', 512); define('SMARTIRC_TYPE_NICKCHANGE', 1024); define('SMARTIRC_TYPE_KICK', 2048); define('SMARTIRC_TYPE_QUIT', 4096); define('SMARTIRC_TYPE_LOGIN', 8192); define('SMARTIRC_TYPE_INFO', 16384); define('SMARTIRC_TYPE_LIST', 32768); define('SMARTIRC_TYPE_NAME', 65536); define('SMARTIRC_TYPE_MOTD', 131072); define('SMARTIRC_TYPE_MODECHANGE', 262144); define('SMARTIRC_TYPE_PART', 524288); define('SMARTIRC_TYPE_ERROR', 1048576); define('SMARTIRC_TYPE_BANLIST', 2097152); define('SMARTIRC_TYPE_TOPIC', 4194304); define('SMARTIRC_TYPE_NONRELEVANT', 8388608); define('SMARTIRC_TYPE_WHOIS', 16777216); define('SMARTIRC_TYPE_WHOWAS', 33554432); define('SMARTIRC_TYPE_USERMODE', 67108864); define('SMARTIRC_TYPE_CHANNELMODE', 134217728); define('SMARTIRC_TYPE_CTCP_REQUEST', 268435456); define('SMARTIRC_TYPE_CTCP_REPLY', 536870912); //define('SMARTIRC_TYPE_DCC', 536870912); define('SMARTIRC_TYPE_ALL', 1073741823); // see https://www.alien.net.au/irc/irc2numerics.html $SMARTIRC_nreplycodes = array( '001' => 'RPL_WELCOME', '002' => 'RPL_YOURHOST', '003' => 'RPL_CREATED', '004' => 'RPL_MYINFO', '005' => 'RPL_BOUNCE', '008' => 'RPL_SNOMASK', '009' => 'RPL_STATMEMTOT', '014' => 'RPL_YOURCOOKIE', '042' => 'RPL_YOURID', '043' => 'RPL_SAVENICK', '050' => 'RPL_ATTEMPTINGJUNC', '051' => 'RPL_ATTEMPTINGREROUTE', '200' => 'RPL_TRACELINK', '201' => 'RPL_TRACECONNECTING', '202' => 'RPL_TRACEHANDSHAKE', '203' => 'RPL_TRACEUNKNOWN', '204' => 'RPL_TRACEOPERATOR', '205' => 'RPL_TRACEUSER', '206' => 'RPL_TRACESERVER', '207' => 'RPL_TRACESERVICE', '208' => 'RPL_TRACENEWTYPE', '209' => 'RPL_TRACECLASS', '210' => 'RPL_TRACERECONNECT', '211' => 'RPL_STATSLINKINFO', '212' => 'RPL_STATSCOMMANDS', '213' => 'RPL_STATSCLINE', '215' => 'RPL_STATSILINE', '216' => 'RPL_STATSKLINE', '218' => 'RPL_STATSYLINE', '219' => 'RPL_ENDOFSTATS', '221' => 'RPL_UMODEIS', '231' => 'RPL_SERVICEINFO', '232' => 'RPL_ENDOFSERVICES', '233' => 'RPL_SERVICE', '234' => 'RPL_SERVLIST', '235' => 'RPL_SERVLISTEND', '236' => 'RPL_STATSVERBOSE', '237' => 'RPL_STATSENGINE', '239' => 'RPL_STATSIAUTH', '240' => 'RPL_STATSVLINE', '241' => 'RPL_STATSLLINE', '242' => 'RPL_STATSUPTIME', '243' => 'RPL_STATSOLINE', '244' => 'RPL_STATSHLINE', '245' => 'RPL_STATSSLINE', '246' => 'RPL_STATSPING', '247' => 'RPL_STATSBLINE', '250' => 'RPL_STATSDLINE', '251' => 'RPL_LUSERCLIENT', '252' => 'RPL_LUSEROP', '253' => 'RPL_LUSERUNKNOWN', '254' => 'RPL_LUSERCHANNELS', '255' => 'RPL_LUSERME', '256' => 'RPL_ADMINME', '257' => 'RPL_ADMINLOC1', '258' => 'RPL_ADMINLOC2', '259' => 'RPL_ADMINEMAIL', '261' => 'RPL_TRACELOG', '262' => 'RPL_TRACEEND', '263' => 'RPL_TRYAGAIN', '265' => 'RPL_LOCALUSERS', '266' => 'RPL_GLOBALUSERS', '267' => 'RPL_START_NETSTAT', '268' => 'RPL_NETSTAT', '269' => 'RPL_END_NETSTAT', '270' => 'RPL_PRIVS', '271' => 'RPL_SILELIST', '272' => 'RPL_ENDOFSILELIST', '273' => 'RPL_NOTIFY', '277' => 'RPL_VCHANLIST', '278' => 'RPL_VCHANHELP', '280' => 'RPL_GLIST', '296' => 'RPL_CHANINFO_KICKS', '299' => 'RPL_END_CHANINFO', '300' => 'RPL_NONE', '301' => 'RPL_AWAY', '302' => 'RPL_USERHOST', '303' => 'RPL_ISON', '304' => 'RPL_TEXT', '305' => 'RPL_UNAWAY', '306' => 'RPL_NOWAWAY', '311' => 'RPL_WHOISUSER', '312' => 'RPL_WHOISSERVER', '313' => 'RPL_WHOISOPERATOR', '314' => 'RPL_WHOWASUSER', '315' => 'RPL_ENDOFWHO', '316' => 'RPL_WHOISCHANOP', '317' => 'RPL_WHOISIDLE', '318' => 'RPL_ENDOFWHOIS', '319' => 'RPL_WHOISCHANNELS', '321' => 'RPL_LISTSTART', '322' => 'RPL_LIST', '323' => 'RPL_LISTEND', '324' => 'RPL_CHANNELMODEIS', '325' => 'RPL_UNIQOPIS', '326' => 'RPL_NOCHANPASS', '327' => 'RPL_CHPASSUNKNOWN', '328' => 'RPL_CHANNEL_URL', '329' => 'RPL_CREATIONTIME', '331' => 'RPL_NOTOPIC', '332' => 'RPL_TOPIC', '333' => 'RPL_TOPICWHOTIME', '339' => 'RPL_BADCHANPASS', '340' => 'RPL_USERIP', '341' => 'RPL_INVITING', '342' => 'RPL_SUMMONING', '345' => 'RPL_INVITED', '346' => 'RPL_INVITELIST', '347' => 'RPL_ENDOFINVITELIST', '348' => 'RPL_EXCEPTLIST', '349' => 'RPL_ENDOFEXCEPTLIST', '351' => 'RPL_VERSION', '352' => 'RPL_WHOREPLY', '353' => 'RPL_NAMREPLY', '354' => 'RPL_WHOSPCRPL', '355' => 'RPL_NAMREPLY_', '361' => 'RPL_KILLDONE', '362' => 'RPL_CLOSING', '363' => 'RPL_CLOSEEND', '364' => 'RPL_LINKS', '365' => 'RPL_ENDOFLINKS', '366' => 'RPL_ENDOFNAMES', '367' => 'RPL_BANLIST', '368' => 'RPL_ENDOFBANLIST', '369' => 'RPL_ENDOFWHOWAS', '371' => 'RPL_INFO', '372' => 'RPL_MOTD', '373' => 'RPL_INFOSTART', '374' => 'RPL_ENDOFINFO', '375' => 'RPL_MOTDSTART', '376' => 'RPL_ENDOFMOTD', '381' => 'RPL_YOUREOPER', '382' => 'RPL_REHASHING', '383' => 'RPL_YOURESERVICE', '384' => 'RPL_MYPORTIS', '385' => 'RPL_NOTOPERANYMORE', '388' => 'RPL_ALIST', '389' => 'RPL_ENDOFALIST', '391' => 'RPL_TIME', '392' => 'RPL_USERSSTART', '393' => 'RPL_USERS', '394' => 'RPL_ENDOFUSERS', '395' => 'RPL_NOUSERS', '396' => 'RPL_HOSTHIDDEN', '400' => 'ERR_UNKNOWNERROR', '401' => 'ERR_NOSUCHNICK', '402' => 'ERR_NOSUCHSERVER', '403' => 'ERR_NOSUCHCHANNEL', '404' => 'ERR_CANNOTSENDTOCHAN', '405' => 'ERR_TOOMANYCHANNELS', '406' => 'ERR_WASNOSUCHNICK', '407' => 'ERR_TOOMANYTARGETS', '408' => 'ERR_NOSUCHSERVICE', '409' => 'ERR_NOORIGIN', '411' => 'ERR_NORECIPIENT', '412' => 'ERR_NOTEXTTOSEND', '413' => 'ERR_NOTOPLEVEL', '414' => 'ERR_WILDTOPLEVEL', '415' => 'ERR_BADMASK', '419' => 'ERR_LENGTHTRUNCATED', '421' => 'ERR_UNKNOWNCOMMAND', '422' => 'ERR_NOMOTD', '423' => 'ERR_NOADMININFO', '424' => 'ERR_FILEERROR', '425' => 'ERR_NOOPERMOTD', '429' => 'ERR_TOOMANYAWAY', '430' => 'ERR_EVENTNICKCHANGE', '431' => 'ERR_NONICKNAMEGIVEN', '432' => 'ERR_ERRONEUSNICKNAME', '433' => 'ERR_NICKNAMEINUSE', '436' => 'ERR_NICKCOLLISION', '437' => 'ERR_UNAVAILRESOURCE', '439' => 'ERR_TARGETTOOFAST', '400' => 'ERR_SERVICESDOWN', '441' => 'ERR_USERNOTINCHANNEL', '442' => 'ERR_NOTONCHANNEL', '443' => 'ERR_USERONCHANNEL', '444' => 'ERR_NOLOGIN', '445' => 'ERR_SUMMONDISABLED', '446' => 'ERR_USERSDISABLED', '447' => 'ERR_NONICKCHANGE', '449' => 'ERR_NOTIMPLEMENTED', '451' => 'ERR_NOTREGISTERED', '452' => 'ERR_IDCOLLISION', '453' => 'ERR_NICKLOST', '455' => 'ERR_HOSTILENAME', '456' => 'ERR_ACCEPTFULL', '457' => 'ERR_ACCEPTEXIST', '458' => 'ERR_ACCEPTNOT', '459' => 'ERR_NOHIDING', '460' => 'ERR_NOTFORHALFOPS', '461' => 'ERR_NEEDMOREPARAMS', '462' => 'ERR_ALREADYREGISTRED', '463' => 'ERR_NOPERMFORHOST', '464' => 'ERR_PASSWDMISMATCH', '465' => 'ERR_YOUREBANNEDCREEP', '466' => 'ERR_YOUWILLBEBANNED', '467' => 'ERR_KEYSET', '469' => 'ERR_LINKSET', '471' => 'ERR_CHANNELISFULL', '472' => 'ERR_UNKNOWNMODE', '473' => 'ERR_INVITEONLYCHAN', '474' => 'ERR_BANNEDFROMCHAN', '475' => 'ERR_BADCHANNELKEY', '476' => 'ERR_BADCHANMASK', '477' => 'ERR_NOCHANMODES', '478' => 'ERR_BANLISTFULL', '481' => 'ERR_NOPRIVILEGES', '482' => 'ERR_CHANOPRIVSNEEDED', '483' => 'ERR_CANTKILLSERVER', '484' => 'ERR_RESTRICTED', '485' => 'ERR_UNIQOPPRIVSNEEDED', '491' => 'ERR_NOOPERHOST', '492' => 'ERR_NOSERVICEHOST', '493' => 'ERR_NOFEATURE', '494' => 'ERR_BADFEATURE', '495' => 'ERR_BADLOGTYPE', '496' => 'ERR_BADLOGSYS', '497' => 'ERR_BADLOGVALUE', '498' => 'ERR_ISOPERLCHAN', '499' => 'ERR_CHANOWNPRIVNEEDED', '501' => 'ERR_UMODEUNKNOWNFLAG', '502' => 'ERR_USERSDONTMATCH', '504' => 'ERR_USERNOTONSERV', '511' => 'ERR_SILELISTFULL', '512' => 'ERR_TOOMANYWATCH', '513' => 'ERR_BADPING', '515' => 'ERR_BADEXPIRE', '516' => 'ERR_DONTCHEAT', '517' => 'ERR_DISABLED', '522' => 'ERR_WHOSYNTAX', '523' => 'ERR_WHOLIMEXCEED', '550' => 'ERR_BADHOSTMASK', '551' => 'ERR_HOSTUNAVAIL', '552' => 'ERR_USINGSLINE', '600' => 'RPL_LOGON', '601' => 'RPL_LOGOFF', '602' => 'RPL_WATCHOFF', '603' => 'RPL_WATCHSTAT', '604' => 'RPL_NOWON', '605' => 'RPL_NOWOFF', '606' => 'RPL_WATCHLIST', '607' => 'RPL_ENDOFWATCHLIST', '608' => 'RPL_WATCHCLEAR', '611' => 'RPL_ISLOCOP', '612' => 'RPL_ISNOTOPER', '613' => 'RPL_ENDOFISOPER', '618' => 'RPL_DCCLIST', '626' => 'RPL_ENDOFO', '630' => 'RPL_SETTINGS', '631' => 'RPL_ENDOFSETTINGS', '660' => 'RPL_TRACEROUTE_HOP', '661' => 'RPL_TRACEROUTE_START', '662' => 'RPL_MODECHANGEWARN', '663' => 'RPL_CHANREDIR', '664' => 'RPL_SERVMODEIS', '665' => 'RPL_OTHERUMODEIS', '666' => 'RPL_ENDOF_GENERIC', '670' => 'RPL_WHOWASDETAILS', '671' => 'RPL_WHOISSECURE', '672' => 'RPL_UNKNOWNMODES', '673' => 'RPL_CANNOTSETMODES', '678' => 'RPL_LUSERSTAFF', '679' => 'RPL_TIMEONSERVERIS', '682' => 'RPL_NETWORKS', '687' => 'RPL_YOURLANGUAGEIS', '688' => 'RPL_LANGUAGE', '689' => 'RPL_WHOISSTAFF', '690' => 'RPL_WHOISLANGUAGE', '702' => 'RPL_MODLIST', '703' => 'RPL_ENDOFMODLIST', '704' => 'RPL_HELPSTART', '705' => 'RPL_HELPTXT', '706' => 'RPL_ENDOFHELP', '708' => 'RPL_ETRACEFULL', '709' => 'RPL_ETRACE', '710' => 'RPL_KNOCK', '711' => 'RPL_KNOCKDLVR', '712' => 'ERR_TOOMANYKNOCK', '713' => 'ERR_CHANOPEN', '714' => 'ERR_KNOCKONCHAN', '715' => 'ERR_KNOCKDISABLED', '716' => 'RPL_TARGUMODEG', '717' => 'RPL_TARGNOTIFY', '718' => 'RPL_UMODEGMSG', '720' => 'RPL_OMOTDSTART', '721' => 'RPL_OMOTD', '722' => 'RPL_ENDOFOMOTD', '723' => 'ERR_NOPRIVS', '724' => 'RPL_TESTMARK', '725' => 'RPL_TESTLINE', '726' => 'RPL_NOTESTLINE', '771' => 'RPL_XINFO', '773' => 'RPL_XINFOSTART', '774' => 'RPL_XINFOEND', '972' => 'ERR_CANNOTDOCOMMAND', '973' => 'ERR_CANNOTCHANGEUMODE', '974' => 'ERR_CANNOTCHANGECHANMODE', '975' => 'ERR_CANNOTCHANGESERVERMODE', '976' => 'ERR_CANNOTSENDTONICK', '977' => 'ERR_UNKNOWNSERVERMODE', '979' => 'ERR_SERVERMODELOCK', '980' => 'ERR_BADCHARENCODING', '981' => 'ERR_TOOMANYLANGUAGES', '982' => 'ERR_NOLANGUAGE', '983' => 'ERR_TEXTTOOSHORT', '999' => 'ERR_NUMERIC_ERR', ); foreach ($SMARTIRC_nreplycodes as $key => $value) { define('SMARTIRC_'.$value, $key); } Net_SmartIRC-1.1.7/Net/SmartIRC/irccommands.php0000600000175000017500000003737412514342261020570 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ abstract class Net_SmartIRC_irccommands { /** * sends a new message * * Sends a message to a channel or user. * * @see DOCUMENTATION * @param integer $type specifies the type, like QUERY/ACTION or CTCP see 'Message Types' * @param string $destination can be a user or channel * @param mixed $messagearray the message * @param integer $priority the priority level of the message * @return boolean|Net_SmartIRC * @api */ public function message($type, $destination, $messagearray, $priority = SMARTIRC_MEDIUM ) { if (!is_array($messagearray)) { $messagearray = array($messagearray); } switch ($type) { case SMARTIRC_TYPE_CHANNEL: case SMARTIRC_TYPE_QUERY: foreach ($messagearray as $message) { $this->send('PRIVMSG '.$destination.' :'.$message, $priority); } break; case SMARTIRC_TYPE_ACTION: foreach ($messagearray as $message) { $this->send('PRIVMSG '.$destination.' :'.chr(1).'ACTION ' .$message.chr(1), $priority ); } break; case SMARTIRC_TYPE_NOTICE: foreach ($messagearray as $message) { $this->send('NOTICE '.$destination.' :'.$message, $priority); } break; case SMARTIRC_TYPE_CTCP: // backwards compatibilty case SMARTIRC_TYPE_CTCP_REPLY: foreach ($messagearray as $message) { $this->send('NOTICE '.$destination.' :'.chr(1).$message .chr(1), $priority ); } break; case SMARTIRC_TYPE_CTCP_REQUEST: foreach ($messagearray as $message) { $this->send('PRIVMSG '.$destination.' :'.chr(1).$message .chr(1), $priority ); } break; default: return false; } return $this; } // /** * Joins one or more IRC channels with an optional key. * * @param mixed $channelarray * @param string $key * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function join($channelarray, $key = null, $priority = SMARTIRC_MEDIUM) { if (!is_array($channelarray)) { $channelarray = array($channelarray); } $channellist = implode(',', $channelarray); if ($key !== null) { foreach ($channelarray as $idx => $value) { $this->send('JOIN '.$value.' '.$key, $priority); } } else { foreach ($channelarray as $idx => $value) { $this->send('JOIN '.$value, $priority); } } return $this; } /** * parts from one or more IRC channels with an optional reason * * @param mixed $channelarray * @param string $reason * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function part($channelarray, $reason = null, $priority = SMARTIRC_MEDIUM ) { if (!is_array($channelarray)) { $channelarray = array($channelarray); } $channellist = implode(',', $channelarray); if ($reason !== null) { $this->send('PART '.$channellist.' :'.$reason, $priority); } else { $this->send('PART '.$channellist, $priority); } return $this; } /** * Kicks one or more user from an IRC channel with an optional reason. * * @param string $channel * @param mixed $nicknamearray * @param string $reason * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function kick($channel, $nicknamearray, $reason = null, $priority = SMARTIRC_MEDIUM ) { if (!is_array($nicknamearray)) { $nicknamearray = array($nicknamearray); } $nicknamelist = implode(',', $nicknamearray); if ($reason !== null) { $this->send('KICK '.$channel.' '.$nicknamelist.' :'.$reason, $priority); } else { $this->send('KICK '.$channel.' '.$nicknamelist, $priority); } return $this; } /** * gets a list of one ore more channels * * Requests a full channellist if $channelarray is not given. * (use it with care, usualy its a looooong list) * * @param mixed $channelarray * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function getList($channelarray = null, $priority = SMARTIRC_MEDIUM) { if ($channelarray !== null) { if (!is_array($channelarray)) { $channelarray = array($channelarray); } $channellist = implode(',', $channelarray); $this->send('LIST '.$channellist, $priority); } else { $this->send('LIST', $priority); } return $this; } /** * requests all nicknames of one or more channels * * The requested nickname list also includes op and voice state * * @param mixed $channelarray * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function names($channelarray = null, $priority = SMARTIRC_MEDIUM) { if ($channelarray !== null) { if (!is_array($channelarray)) { $channelarray = array($channelarray); } $channellist = implode(',', $channelarray); $this->send('NAMES '.$channellist, $priority); } else { $this->send('NAMES', $priority); } return $this; } /** * sets a new topic of a channel * * @param string $channel * @param string $newtopic * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function setTopic($channel, $newtopic, $priority = SMARTIRC_MEDIUM) { $this->send('TOPIC '.$channel.' :'.$newtopic, $priority); return $this; } /** * gets the topic of a channel * * @param string $channel * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function getTopic($channel, $priority = SMARTIRC_MEDIUM) { $this->send('TOPIC '.$channel, $priority); return $this; } /** * sets or gets the mode of an user or channel * * Changes/requests the mode of the given target. * * @param string $target the target, can be an user (only yourself) or a channel * @param string $newmode the new mode like +mt * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function mode($target, $newmode = null, $priority = SMARTIRC_MEDIUM) { if ($newmode !== null) { $this->send('MODE '.$target.' '.$newmode, $priority); } else { $this->send('MODE '.$target, $priority); } return $this; } /** * founders an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function founder($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '+q '.$nickname, $priority); } /** * defounders an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function defounder($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-q '.$nickname, $priority); } /** * admins an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function admin($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '+a '.$nickname, $priority); } /** * deadmins an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function deadmin($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-a '.$nickname, $priority); } /** * ops an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function op($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '+o '.$nickname, $priority); } /** * deops an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function deop($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-o '.$nickname, $priority); } /** * hops an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function hop($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '+h '.$nickname, $priority); } /** * dehops an user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function dehop($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-h '.$nickname, $priority); } /** * voice a user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function voice($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '+v '.$nickname, $priority); } /** * devoice a user in the given channel * * @param string $channel * @param string $nickname * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function devoice($channel, $nickname, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-v '.$nickname, $priority); } /** * bans a hostmask for the given channel or requests the current banlist * * The banlist will be requested if no hostmask is specified * * @param string $channel * @param string $hostmask * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function ban($channel, $hostmask = null, $priority = SMARTIRC_MEDIUM) { if ($hostmask !== null) { $this->mode($channel, '+b '.$hostmask, $priority); } else { $this->mode($channel, 'b', $priority); } return $this; } /** * unbans a hostmask on the given channel * * @param string $channel * @param string $hostmask * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function unban($channel, $hostmask, $priority = SMARTIRC_MEDIUM) { return $this->mode($channel, '-b '.$hostmask, $priority); } /** * invites a user to the specified channel * * @param string $nickname * @param string $channel * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function invite($nickname, $channel, $priority = SMARTIRC_MEDIUM) { return $this->send('INVITE '.$nickname.' '.$channel, $priority); } /** * changes the own nickname * * Trys to set a new nickname, nickcollisions are handled. * * @param string $newnick * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function changeNick($newnick, $priority = SMARTIRC_MEDIUM) { $this->_nick = $newnick; return $this->send('NICK '.$newnick, $priority); } /** * requests a 'WHO' from the specified target * * @param string $target * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function who($target, $priority = SMARTIRC_MEDIUM) { return $this->send('WHO '.$target, $priority); } /** * requests a 'WHOIS' from the specified target * * @param string $target * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function whois($target, $priority = SMARTIRC_MEDIUM) { return $this->send('WHOIS '.$target, $priority); } /** * requests a 'WHOWAS' from the specified target * (if he left the IRC network) * * @param string $target * @param integer $priority message priority, default is SMARTIRC_MEDIUM * @return Net_SmartIRC * @api */ public function whowas($target, $priority = SMARTIRC_MEDIUM) { return $this->send('WHOWAS '.$target, $priority); } /** * sends QUIT to IRC server and disconnects * * @param string $quitmessage optional quitmessage * @param integer $priority message priority, default is SMARTIRC_CRITICAL * @return Net_SmartIRC * @api */ public function quit($quitmessage = null, $priority = SMARTIRC_CRITICAL) { if ($quitmessage !== null) { $this->send('QUIT :'.$quitmessage, $priority); } else { $this->send('QUIT', $priority); } return $this->disconnect(true); } } Net_SmartIRC-1.1.7/Net/SmartIRC/messagehandler.php0000600000175000017500000005764012514342261021251 0ustar ubuntuubuntu * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ abstract class Net_SmartIRC_messagehandler extends Net_SmartIRC_irccommands { /* misc */ protected function _event_ping($ircdata) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: Ping? Pong!', __FILE__, __LINE__ ); $this->send('PONG :' . $ircdata->message, SMARTIRC_CRITICAL); } protected function _event_error($ircdata) { if ($this->_autoretry) { $this->_delayReconnect(); $this->reconnect(); } else { $this->disconnect(true); } } protected function _event_join($ircdata) { if ($this->_channelsyncing) { if ($this->_nick == $ircdata->nick) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: joining channel: '.$ircdata->channel, __FILE__, __LINE__ ); $channel = new Net_SmartIRC_channel(); $channel->name = $ircdata->channel; $microint = microtime(true); $channel->synctime_start = $microint; $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: synctime_start for ' .$ircdata->channel.' set to: '.$microint, __FILE__, __LINE__ ); $this->_channels[strtolower($channel->name)] = $channel; // the class will get his own who data from the whole who channel list $this->mode($channel->name); $this->who($channel->name); $this->ban($channel->name); } else { // the class didn't join but someone else, lets get his who data $this->who($ircdata->nick); } $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: ' .$ircdata->nick.' joins channel: '.$ircdata->channel, __FILE__, __LINE__ ); $channel = &$this->getChannel($ircdata->channel); $user = new Net_SmartIRC_channeluser(); $user->nick = $ircdata->nick; $user->ident = $ircdata->ident; $user->host = $ircdata->host; $this->_adduser($channel, $user); } } protected function _event_part($ircdata) { if ($this->_channelsyncing) { $this->_removeuser($ircdata); } } protected function _event_kick($ircdata) { if ($this->_channelsyncing) { $this->_removeuser($ircdata); } } protected function _event_quit($ircdata) { if ($this->_channelsyncing) { $this->_removeuser($ircdata); } } protected function _event_nick($ircdata) { if ($this->_channelsyncing) { $newnick = $ircdata->params[0]; $lowerednewnick = strtolower($newnick); $lowerednick = strtolower($ircdata->nick); $channelkeys = array_keys($this->_channels); foreach ($channelkeys as $channelkey) { // loop through all channels $channel = &$this->getChannel($channelkey); foreach ($channel->users as $uservalue) { // loop through all user in this channel if ($ircdata->nick == $uservalue->nick) { // found him // time for updating the object and his nickname $channel->users[$lowerednewnick] = $channel->users[$lowerednick] ; $channel->users[$lowerednewnick]->nick = $newnick; if ($lowerednewnick != $lowerednick) { unset($channel->users[$lowerednick]); } // he was maybe op or voice, update coming $lists = array('founders', 'admins', 'ops', 'hops', 'voices' ); foreach ($lists as $list) { if (isset($channel->$list[$ircdata->nick])) { $channel->$list[$newnick] = $channel->$list[$ircdata->nick]; unset($channel->$list[$ircdata->nick]); } } break; } } } } } protected function _event_mode($ircdata) { // check if its own usermode if ($ircdata->params[0] == $this->_nick) { $this->_usermode = $ircdata->message; } else if ($this->_channelsyncing) { // it's not, and we do channel syncing $channel = &$this->getChannel($ircdata->channel); $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: updating channel mode for: ' .$channel->name, __FILE__, __LINE__ ); $mode = $ircdata->params[1]; $parameters = array_slice($ircdata->params, 2); $add = false; $remove = false; $modelength = strlen($mode); for ($i = 0; $i < $modelength; $i++) { switch($mode{$i}) { case '-': $remove = true; $add = false; break; case '+': $add = true; $remove = false; break; // user modes case 'q': $nick = array_shift($parameters); $lowerednick = strtolower($nick); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding founder: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $channel->founders[$nick] = true; $channel->users[$lowerednick]->founder = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing founder: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); unset($channel->founders[$nick]); $channel->users[$lowerednick]->founder = false; } break; case 'a': $nick = array_shift($parameters); $lowerednick = strtolower($nick); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding admin: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $channel->admins[$nick] = true; $channel->users[$lowerednick]->admin = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing admin: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); unset($channel->admins[$nick]); $channel->users[$lowerednick]->admin = false; } break; case 'o': $nick = array_shift($parameters); $lowerednick = strtolower($nick); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding op: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $channel->ops[$nick] = true; $channel->users[$lowerednick]->op = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing op: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); unset($channel->ops[$nick]); $channel->users[$lowerednick]->op = false; } break; case 'h': $nick = array_shift($parameters); $lowerednick = strtolower($nick); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding half-op: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $channel->hops[$nick] = true; $channel->users[$lowerednick]->hop = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing half-op: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); unset($channel->hops[$nick]); $channel->users[$lowerednick]->hop = false; } break; case 'v': $nick = array_shift($parameters); $lowerednick = strtolower($nick); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding voice: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $channel->voices[$nick] = true; $channel->users[$lowerednick]->voice = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing voice: '.$nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); unset($channel->voices[$nick]); $channel->users[$lowerednick]->voice = false; } break; case 'k': $key = array_shift($parameters); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: stored channel key for: ' .$channel->name, __FILE__, __LINE__ ); $channel->key = $key; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removed channel key for: ' .$channel->name, __FILE__, __LINE__ ); $channel->key = ''; } break; case 'l': if ($add) { $limit = array_shift($parameters); $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: stored user limit for: ' .$channel->name, __FILE__, __LINE__ ); $channel->user_limit = $limit; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removed user limit for: ' .$channel->name, __FILE__, __LINE__ ); $channel->user_limit = false; } break; default: // channel modes if ($mode{$i} == 'b') { $hostmask = array_shift($parameters); if ($add) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: adding ban: ' .$hostmask.' for: '.$channel->name, __FILE__, __LINE__ ); $channel->bans[$hostmask] = true; } if ($remove) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing ban: ' .$hostmask.' for: '.$channel->name, __FILE__, __LINE__ ); unset($channel->bans[$hostmask]); } } else { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: updating unknown channelmode (' .$mode{$i}.') in channel->mode for: ' .$channel->name, __FILE__, __LINE__ ); if ($add) { $channel->mode .= $mode{$i}; } if ($remove) { $channel->mode = str_replace($mode{$i}, '', $channel->mode ); } } } } } } protected function _event_topic($ircdata) { if ($this->_channelsyncing) { $channel = &$this->getChannel($ircdata->channel); $channel->topic = $ircdata->message; } } protected function _event_privmsg($ircdata) { if ($ircdata->type & SMARTIRC_TYPE_CTCP_REQUEST) { // substr must be 1,4 because of \001 in CTCP messages if (substr($ircdata->message, 1, 4) == 'PING') { $this->message(SMARTIRC_TYPE_CTCP_REPLY, $ircdata->nick, 'PING'.substr($ircdata->message, 5, -1) ); } elseif (substr($ircdata->message, 1, 7) == 'VERSION') { if (!empty($this->_ctcpversion)) { $versionstring = $this->_ctcpversion; } else { $versionstring = SMARTIRC_VERSIONSTRING; } $this->message(SMARTIRC_TYPE_CTCP_REPLY, $ircdata->nick, 'VERSION '.$versionstring ); } elseif (substr($ircdata->message, 1, 10) == 'CLIENTINFO') { $this->message(SMARTIRC_TYPE_CTCP_REPLY, $ircdata->nick, 'CLIENTINFO PING VERSION CLIENTINFO' ); } } } /* rpl_ */ protected function _event_rpl_welcome($ircdata) { $this->_loggedin = true; // updating our nickname, that we got (maybe cutted...) $this->_nick = $ircdata->params[0]; $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: logged in as ' . $this->_nick, __FILE__, __LINE__ ); } protected function _event_rpl_motdstart($ircdata) { $this->_motd[] = $ircdata->message; } protected function _event_rpl_motd($ircdata) { $this->_motd[] = $ircdata->message; } protected function _event_rpl_endofmotd($ircdata) { $this->_motd[] = $ircdata->message; } protected function _event_rpl_umodeis($ircdata) { $this->_usermode = $ircdata->message; } protected function _event_rpl_channelmodeis(&$ircdata) { if ($this->_channelsyncing && $this->isJoined($ircdata->channel)) { $ircdata->params[0] = ''; // let _mode() handle the received mode $this->_event_mode($ircdata); } } protected function _event_rpl_whoreply($ircdata) { if ($this->_channelsyncing) { $offset = (int) ($ircdata->params[0] == $this->_nick); $nick = $ircdata->params[4 + $offset]; if ($ircdata->channel == '*') { // we got who info without channel info, so search the user // on all channels and update him foreach ($this->_channels as $channel) { if ($this->isJoined($channel->name, $nick)) { $ircdata->channel = $channel->name; $this->_event_rpl_whoreply($ircdata); } } } else { if (!$this->isJoined($ircdata->channel, $nick)) { return; } $user = new Net_SmartIRC_channeluser(); $user->ident = $ircdata->params[1 + $offset]; $user->host = $ircdata->params[2 + $offset]; $user->server = $ircdata->params[3 + $offset]; $user->nick = $nick; $user->ircop = false; $user->founder = false; $user->admin = false; $user->op = false; $user->hop = false; $user->voice = false; $usermode = $ircdata->params[5 + $offset]; $usermodelength = strlen($usermode); for ($i = 0; $i < $usermodelength; $i++) { switch ($usermode[$i]) { case 'H': $user->away = false; break; case 'G': $user->away = true; break; case '*': $user->ircop = true; break; case '~': $user->founder = true; break; case '&': $user->admin = true; break; case '@': $user->op = true; break; case '%': $user->hop = true; break; case '+': $user->voice = true; } $user->modes .= $usermode[$i]; } $user->hopcount = $ircdata->messageex[0]; $user->realname = implode(array_slice($ircdata->messageex, 1), ' '); $channel = &$this->getChannel($ircdata->channel); $this->_adduser($channel, $user); } } } protected function _event_rpl_namreply($ircdata) { if ($this->_channelsyncing) { $userarray = explode(' ', rtrim($ircdata->message)); $userarraycount = count($userarray); for ($i = 0; $i < $userarraycount; $i++) { $user = new Net_SmartIRC_channeluser(); switch ($userarray[$i]{0}) { case '~': $user->founder = true; $user->nick = substr($userarray[$i], 1); break; case '&': $user->admin = true; $user->nick = substr($userarray[$i], 1); break; case '@': $user->op = true; $user->nick = substr($userarray[$i], 1); break; case '%': $user->hop = true; $user->nick = substr($userarray[$i], 1); break; case '+': $user->voice = true; $user->nick = substr($userarray[$i], 1); break; default: $user->nick = $userarray[$i]; } $channel = &$this->getChannel($ircdata->channel); $this->_adduser($channel, $user); } } } protected function _event_rpl_banlist($ircdata) { if ($this->_channelsyncing && $this->isJoined($ircdata->channel)) { $channel = &$this->getChannel($ircdata->channel); $hostmask = $ircdata->params[1]; $channel->bans[$hostmask] = true; } } protected function _event_rpl_endofbanlist($ircdata) { if ($this->_channelsyncing && $this->isJoined($ircdata->channel)) { $channel = &$this->getChannel($ircdata->channel); if ($channel->synctime_stop == 0) { // we received end of banlist and the stop timestamp is not set yet $channel->synctime_stop = microtime(true); $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: synctime_stop for '.$ircdata->channel .' set to: '.$channel->synctime_stop, __FILE__, __LINE__ ); $channel->synctime = (float)$channel->synctime_stop - (float)$channel->synctime_start ; $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: synced channel '.$ircdata->channel .' in '.round($channel->synctime, 2).' secs', __FILE__, __LINE__ ); } } } protected function _event_rpl_topic($ircdata) { if ($this->_channelsyncing) { $channel = &$this->getChannel($ircdata->channel); $channel->topic = $ircdata->message; } } /* err_ */ protected function _event_err_nicknameinuse($ircdata) { $newnick = substr($this->_nick, 0, 5) . rand(0, 999); $this->changeNick($newnick, SMARTIRC_CRITICAL); } } Net_SmartIRC-1.1.7/Net/SmartIRC.php0000644000175000017500000025121212514342261016266 0ustar ubuntuubuntu and * Latest versions of Net_SmartIRC you will find on the project homepage * or get it through PEAR since SmartIRC is an official PEAR package. * * Official Project Homepage: * * Net_SmartIRC conforms to RFC 2812 (Internet Relay Chat: Client Protocol) * * Copyright (c) 2002-2005 Mirco Bauer * * PHP version 5 * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // ------- PHP code ---------- require_once 'Net/SmartIRC/defines.php'; require_once 'Net/SmartIRC/irccommands.php'; require_once 'Net/SmartIRC/messagehandler.php'; define('SMARTIRC_VERSION', '1.1.7'); define('SMARTIRC_VERSIONSTRING', 'Net_SmartIRC '.SMARTIRC_VERSION); /** * main SmartIRC class * * @category Net * @package Net_SmartIRC * @version 1.1.7 * @author clockwerx * @author Mirco 'meebey' Bauer * @author garrettw * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * @link http://pear.php.net/package/Net_SmartIRC */ class Net_SmartIRC extends Net_SmartIRC_messagehandler { /** * @var integer */ const DEF_AUTORETRY_MAX = 5; /** * @var integer */ const DEF_DISCONNECT_TIME = 1000; /** * @var integer */ const DEF_LOGFILE = 'Net_SmartIRC.log'; /** * @var integer */ const DEF_MAX_TIMER = 300000; /** * @var integer */ const DEF_RECEIVE_DELAY = 100; /** * @var integer */ const DEF_RECONNECT_DELAY = 10000; /** * @var integer */ const DEF_SEND_DELAY = 250; /** * @var integer */ const DEF_TX_RX_TIMEOUT = 300; /** * @var string */ const IP_PATTERN = '/(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:\[[0-9A-Fa-f:]+\])|(?:[a-zA-Z0-9-_.]+)):[0-9]{1,5}/'; /** * @var resource */ protected $_socket; /** * @var string */ protected $_address; /** * @var integer */ protected $_port; /** * @var string */ protected $_bindto = '0:0'; /** * @var string */ protected $_nick; /** * @var string */ protected $_username; /** * @var string */ protected $_realname; /** * @var string */ protected $_usermode; /** * @var string */ protected $_password; /** * @var array */ protected $_performs = array(); /** * @var boolean */ protected $_state = SMARTIRC_STATE_DISCONNECTED; /** * @var array */ protected $_actionhandler = array(); /** * @var array */ protected $_timehandler = array(); /** * @var integer */ protected $_debuglevel = SMARTIRC_DEBUG_NOTICE; /** * @var array */ protected $_messagebuffer = array( SMARTIRC_HIGH => array(), SMARTIRC_MEDIUM => array(), SMARTIRC_LOW => array(), ); /** * @var integer */ protected $_messagebuffersize; /** * @var integer */ protected $_receivedelay = self::DEF_RECEIVE_DELAY; /** * @var integer */ protected $_senddelay = self::DEF_SEND_DELAY; /** * @var integer */ protected $_logdestination = SMARTIRC_STDOUT; /** * @var resource */ protected $_logfilefp = 0; /** * @var string */ protected $_logfile = self::DEF_LOGFILE; /** * @var integer */ protected $_disconnecttime = self::DEF_DISCONNECT_TIME; /** * @var boolean */ protected $_loggedin = false; /** * @var boolean */ protected $_benchmark = false; /** * @var integer */ protected $_benchmark_starttime; /** * @var integer */ protected $_benchmark_stoptime; /** * @var integer */ protected $_actionhandlerid = 0; /** * @var integer */ protected $_timehandlerid = 0; /** * @var array */ protected $_motd = array(); /** * Stores all channels in this array where we are joined, works only if channelsyncing is activated. * Eg. for accessing a user, use it like this: (in this example the SmartIRC object is stored in $irc) * $irc->getUser('#test', 'meebey')->nick; * * @see setChannelSyncing() * @see Net_SmartIRC_channel * @see Net_SmartIRC_channeluser * @var array */ protected $_channels = array(); /** * @var boolean */ protected $_channelsyncing = false; /** * Stores all users that had/have contact with us (channel/query/notice etc.), works only if usersyncing is activated. * Eg. for accessing a user, use it like this: (in this example the SmartIRC object is stored in $irc) * $irc->user['meebey']->host; * * @see setUserSyncing() * @see Net_SmartIRC_ircuser * @var array */ protected $_users = array(); /** * @var boolean */ protected $_usersyncing = false; /** * Stores the path to the modules that can be loaded. * * @var string */ protected $_modulepath = '.'; /** * Stores all objects of the modules. * * @var string */ protected $_modules = array(); /** * @var string */ protected $_ctcpversion = SMARTIRC_VERSIONSTRING; /** * @var mixed */ protected $_mintimer = false; /** * @var integer */ protected $_maxtimer = self::DEF_MAX_TIMER; /** * @var integer */ protected $_txtimeout = self::DEF_TX_RX_TIMEOUT; /** * @var integer */ protected $_rxtimeout = self::DEF_TX_RX_TIMEOUT; /** * @var integer */ protected $_lastrx; /** * @var integer */ protected $_lasttx; /** * */ protected $_lastsentmsgtime = 0; /** * @var integer */ protected $_reconnectdelay = self::DEF_RECONNECT_DELAY; /** * @var boolean */ protected $_autoretry = false; /** * @var integer */ protected $_autoretrymax = self::DEF_AUTORETRY_MAX; /** * @var integer */ protected $_autoretrycount = 0; /** * @var boolean */ protected $_connectionerror = false; /** * @var boolean */ protected $_runasdaemon = false; /** * @var boolean */ protected $_interrupt = false; /** * All numeric IRC replycodes, the index is the numeric replycode. * * @see $SMARTIRC_nreplycodes * @var array */ public $nreplycodes; /** * Constructor. Initiates the messagebuffer and "links" the replycodes from * global into properties. Also some PHP runtime settings are configured. * * @api * @param array $params Properties to set during instantiation * @return object */ public function __construct($params = array()) { $this->nreplycodes = &$GLOBALS['SMARTIRC_nreplycodes']; if (isset($_SERVER['REQUEST_METHOD'])) { // the script is called from a browser, lets set default log destination // to SMARTIRC_BROWSEROUT (makes browser friendly output) $this->setLogDestination(SMARTIRC_BROWSEROUT); } // you'll want to pass an array that includes keys like: // ModulePath, Debug, ChannelSyncing, AutoRetry, RunAsDaemon // so we can call their setters here foreach ($params as $varname => $val) { $funcname = 'set' . $varname; $this->$funcname($val); } } /** * Keeps BC since private properties were once publicly accessible. * * @param string $name The property name asked for * @return mixed the property's value */ public function __get($name) { // PHP allows $this->getChannel($param)->memberofobject, // but we need to not break BC. if ($name == 'channel' || $name == 'user'): $name = '_' . $name . 's'; endif; return $this->$name; } /** * Handle calls to renamed or deprecated functions * * @param string $method * @param array $args * @return mixed|void */ public function __call($method, $args) { $map = array( 'setChannelSynching' => 'setChannelSyncing', 'setDebug' => 'setDebugLevel', 'channel' => 'getChannel', '_nicknameinuse' => '_event_err_nicknameinuse', 'setAutoReconnect' => '', 'setUseSockets' => '', ); if (array_key_exists($method, $map)) { if (empty($map[$method])) { $this->log(SMARTIRC_DEBUG_NOTICE, "WARNING: you are using $method() which is deprecated " ."and no longer functional.", __FILE__, __LINE__); } else { $this->log(SMARTIRC_DEBUG_NOTICE, "WARNING: you are using $method() which is a deprecated " ."method, using {$map[$method]}() instead!", __FILE__, __LINE__); return call_user_func_array(array($this, $map[$method]), $args); } } else { $this->log(SMARTIRC_DEBUG_NOTICE, "WARNING: $method() does not exist!", __FILE__, __LINE__); } } /** * Enables/disables autoretry for connecting to a server. * * @api * @param boolean $boolean * @return boolean */ public function setAutoRetry($boolean) { return ($this->_autoretry = (bool) $boolean); } /** * Sets the maximum number of attempts to connect to a server * before giving up. * * @api * @param integer|null $autoretrymax * @return integer */ public function setAutoRetryMax($autoretrymax = null) { if (is_integer($autoretrymax)) { if ($autoretrymax == 0) { $this->setAutoRetry(false); } else { $this->_autoretrymax = $autoretrymax; } } else { $this->_autoretrymax = self::DEF_AUTORETRY_MAX; } return $this->_autoretrymax; } /** * Enables/disables the benchmark engine. * * @api * @param boolean $boolean * @return boolean */ public function setBenchmark($boolean) { return ($this->_benchmark = (bool) $boolean); } /** * Sets an IP address (and optionally, a port) to bind the socket to. * * Limits the bot to claiming only one of the machine's IPs as its home. * Call with no parameters to unbind. * * @api * @param string $addr * @param int $port * @return string The bound address with port */ public function setBindAddress($addr = '0', $port = 0) { if (preg_match(self::IP_PATTERN, $addr) === 0) { $addr .= ':' . $port; } return ($this->_bindto = $addr); } /** * 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. * * @api * @param boolean $boolean * @return boolean */ public function setChannelSyncing($boolean) { if ($boolean) { $this->_channelsyncing = true; $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: Channel syncing enabled', __FILE__, __LINE__ ); } else { $this->_channelsyncing = false; $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: Channel syncing disabled', __FILE__, __LINE__ ); } return $this->_channelsyncing; } /** * Sets the CTCP version reply string. * * @api * @param string $versionstring * @return string */ public function setCtcpVersion($versionstring) { return ($this->_ctcpversion = $versionstring); } /** * 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 * * @api * @see DOCUMENTATION * @see SMARTIRC_DEBUG_NOTICE * @param integer $level * @return integer */ public function setDebugLevel($level) { return ($this->_debuglevel = $level); } /** * Sets the delaytime before closing the socket when disconnect. * * @api * @param integer|null $milliseconds * @return integer */ public function setDisconnectTime($milliseconds = null) { if (is_integer($milliseconds) && $milliseconds >= self::DEF_DISCONNECT_TIME ) { $this->_disconnecttime = $milliseconds; } else { $this->_disconnecttime = self::DEF_DISCONNECT_TIME; } return $this->_disconnecttime; } /** * 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 * * @api * @see SMARTIRC_STDOUT * @param integer $type must be on of the constants * @return integer */ public function setLogDestination($type) { switch ($type) { case SMARTIRC_FILE: case SMARTIRC_STDOUT: case SMARTIRC_SYSLOG: case SMARTIRC_BROWSEROUT: case SMARTIRC_NONE: $this->_logdestination = $type; break; default: $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: unknown logdestination type ('.$type .'), will use STDOUT instead', __FILE__, __LINE__); $this->_logdestination = SMARTIRC_STDOUT; } return $this->_logdestination; } /** * Sets the file for the log if the destination is set to file. * * Sets the logfile, if {@link setLogDestination logdestination} is set to SMARTIRC_FILE. * This should be only used with full path! * * @api * @param string $file * @return string */ public function setLogFile($file) { return ($this->_logfile = $file); } /** * Sets the paths for the modules. * * @api * @param integer $path * @return string */ public function setModulePath($path) { return ($this->_modulepath = $path); } /** * 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 * * @api * @param integer|null $milliseconds * @return integer */ public function setReceiveDelay($milliseconds = null) { if (is_integer($milliseconds) && $milliseconds >= self::DEF_RECEIVE_DELAY ) { $this->_receivedelay = $milliseconds; } else { $this->_receivedelay = self::DEF_RECEIVE_DELAY; } return $this->_receivedelay; } /** * Sets the delaytime before attempting reconnect. * Value of 0 disables the delay entirely. * * @api * @param integer|null $milliseconds * @return integer */ public function setReconnectDelay($milliseconds = null) { if (is_integer($milliseconds)) { $this->_reconnectdelay = $milliseconds; } else { $this->_reconnectdelay = self::DEF_RECONNECT_DELAY; } return $this->_reconnectdelay; } /** * Sets whether the script should be run as a daemon or not * ( actually disables/enables ignore_user_abort() ) * * @api * @param boolean $boolean * @return boolean */ public function setRunAsDaemon($boolean) { $this->_runasdaemon = (bool) $boolean; ignore_user_abort($this->_runasdaemon); return $this->_runasdaemon; } /** * Sets the delay for sending data to the IRC server. * * Sets the delay time between sending messages, to avoid flooding * IRC servers. If your bot has special flooding permissions on the * network you're connected to, you can set this quite low to send * messages faster. * Default: 250 * * @api * @param integer|null $milliseconds * @return integer */ public function setSendDelay($milliseconds = null) { if (is_integer($milliseconds)) { $this->_senddelay = $milliseconds; } else { $this->_senddelay = self::DEF_SEND_DELAY; } return $this->_senddelay; } /** * Sets the receive timeout. * * If the timeout occurs, the connection will be reinitialized * Default: 300 seconds * * @api * @param integer|null $seconds * @return integer */ public function setReceiveTimeout($seconds = null) { if (is_integer($seconds)) { $this->_rxtimeout = $seconds; } else { $this->_rxtimeout = self::DEF_TX_RX_TIMEOUT; } return $this->_rxtimeout; } /** * Sets the transmit timeout. * * If the timeout occurs, the connection will be reinitialized * Default: 300 seconds * * @api * @param integer|null $seconds * @return integer */ public function setTransmitTimeout($seconds = null) { if (is_integer($seconds)) { $this->_txtimeout = $seconds; } else { $this->_txtimeout = self::DEF_TX_RX_TIMEOUT; } return $this->_txtimeout; } /** * Enables/disables user syncing. * * User syncing means, all users we have or had contact with through channel, query or * notice are tracked in the $irc->user array. This is very handy for botcoding. * * @api * @param boolean $boolean * @return boolean */ public function setUserSyncing($boolean) { if ($boolean) { $this->_usersyncing = true; $this->log(SMARTIRC_DEBUG_USERSYNCING, 'DEBUG_USERSYNCING: User syncing enabled', __FILE__, __LINE__); } else { $this->_usersyncing = false; $this->log(SMARTIRC_DEBUG_USERSYNCING, 'DEBUG_USERSYNCING: User syncing disabled', __FILE__, __LINE__); } return $this->_usersyncing; } /** * Starts the benchmark (sets the counters). * * @api * @return Net_SmartIRC */ public function startBenchmark() { $this->_benchmark_starttime = microtime(true); $this->log(SMARTIRC_DEBUG_NOTICE, 'benchmark started', __FILE__, __LINE__); return $this; } /** * Stops the benchmark and displays the result. * * @api * @return Net_SmartIRC */ public function stopBenchmark() { $this->_benchmark_stoptime = microtime(true); $this->log(SMARTIRC_DEBUG_NOTICE, 'benchmark stopped', __FILE__, __LINE__); if ($this->_benchmark) { $this->showBenchmark(); } return $this; } /** * Shows the benchmark result. * * @api * @return Net_SmartIRC */ public function showBenchmark() { $this->log(SMARTIRC_DEBUG_NOTICE, 'benchmark time: ' .((float)$this->_benchmark_stoptime-(float)$this->_benchmark_starttime), __FILE__, __LINE__ ); return $this; } /** * 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 * * @api * @see SMARTIRC_DEBUG_NOTICE * @param integer $level bit constants (SMARTIRC_DEBUG_*) * @param string $entry the new log entry * @param string|null $file The source file originating the log() call * @param int|null $line The line of code that called log() * @return boolean */ public function log($level, $entry, $file = null, $line = null) { // prechecks if (!( is_integer($level) && ($level & SMARTIRC_DEBUG_ALL) )) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: invalid log level passed to log() ('.$level.')', __FILE__, __LINE__ ); return false; } if (!($level & $this->_debuglevel) || $this->_logdestination == SMARTIRC_NONE ) { return true; } if (substr($entry, -1) != "\n") { $entry .= "\n"; } if ($file !== null && $line !== null) { $file = basename($file); $entry = $file.'('.$line.') '.$entry; } else { $entry = 'unknown(0) '.$entry; } $formattedentry = date('M d H:i:s ').$entry; switch ($this->_logdestination) { case SMARTIRC_STDOUT: echo $formattedentry; flush(); break; case SMARTIRC_BROWSEROUT: echo '
'.htmlentities($formattedentry).'
'; break; case SMARTIRC_FILE: if (!is_resource($this->_logfilefp)) { if ($this->_logfilefp === null) { // we reconncted and don't want to destroy the old log entries $this->_logfilefp = fopen($this->_logfile,'a'); } else { $this->_logfilefp = fopen($this->_logfile,'w'); } } fwrite($this->_logfilefp, $formattedentry); fflush($this->_logfilefp); break; case SMARTIRC_SYSLOG: if (!is_int($this->_logfilefp)) { $this->_logfilefp = openlog('Net_SmartIRC', LOG_NDELAY, LOG_DAEMON ); } syslog(LOG_INFO, $entry); } return true; } /** * Returns the full motd. * * @api * @return array */ public function getMotd() { return $this->_motd; } /** * Returns the usermode. * * @api * @return string */ public function getUsermode() { return $this->_usermode; } /** * Returns a reference to the channel object of the specified channelname. * * @api * @param string $channelname * @return object */ public function &getChannel($channelname) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: getChannel() is called and the required Channel ' .'Syncing is not activated!', __FILE__, __LINE__ ); return; } if (isset($this->_channels[strtolower($channelname)])) { return $this->_channels[strtolower($channelname)]; } else { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: getChannel() is called and the required channel ' .$channelname.' has not been joined!', __FILE__, __LINE__ ); } } /** * Returns a reference to the user object for the specified username and channelname. * * @api * @param string $channelname * @param string $username * @return object */ public function &getUser($channelname, $username) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: getUser() is called and' .' the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return; } if ($this->isJoined($channelname, $username)) { return $this->getChannel($channelname)->users[strtolower($username)]; } } /** * Creates the sockets and connects to the IRC server on the given port. * * Returns this SmartIRC object on success, and false on failure. * * @api * @param string $addr * @param integer $port * @return boolean|Net_SmartIRC */ public function connect($addr, $port = 6667) { ob_implicit_flush(); $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: connecting', __FILE__, __LINE__ ); if ($hasPort = preg_match(self::IP_PATTERN, $addr)) { $colon = strrpos($addr, ':'); $this->_address = substr($addr, 0, $colon); $this->_port = (int) substr($addr, $colon + 1); } elseif ($hasPort === 0) { $this->_address = $addr; $this->_port = $port; $addr .= ':' . $port; } $timeout = ini_get("default_socket_timeout"); $context = stream_context_create(array('socket' => array('bindto' => $this->_bindto))); $this->log(SMARTIRC_DEBUG_SOCKET, 'DEBUG_SOCKET: binding to '.$this->_bindto, __FILE__, __LINE__); if ($this->_socket = stream_socket_client($addr, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context) ) { if (!stream_set_blocking($this->_socket, 0)) { $this->log(SMARTIRC_DEBUG_SOCKET, 'DEBUG_SOCKET: unable to unblock stream', __FILE__, __LINE__ ); $this->throwError('unable to unblock stream'); } $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: connected', __FILE__, __LINE__ ); $this->_autoretrycount = 0; $this->_connectionerror = false; $this->registerTimeHandler($this->_rxtimeout * 125, $this, '_pingcheck'); $this->_lasttx = $this->_lastrx = time(); $this->_updatestate(); return $this; } $error_msg = "couldn't connect to \"$addr\" reason: \"$errstr ($errno)\""; $this->log(SMARTIRC_DEBUG_SOCKET, 'DEBUG_NOTICE: '.$error_msg, __FILE__, __LINE__ ); $this->throwError($error_msg); if ($this->_autoretry && $this->_autoretrycount < $this->_autoretrymax) { $this->_autoretrycount++; return $this->reconnect(); } return 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. * $quick: * - true, just close the socket * - false, send QUIT and wait {@link $_disconnectime $_disconnectime} before * closing the socket * * @api * @param boolean $quick default: false * @return boolean|Net_SmartIRC */ function disconnect($quick = false) { if ($this->_updatestate() != SMARTIRC_STATE_CONNECTED) { return false; } if (!$quick) { $this->send('QUIT', SMARTIRC_CRITICAL); usleep($this->_disconnecttime*1000); } fclose($this->_socket); $this->_updatestate(); $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: disconnected', __FILE__, __LINE__ ); if ($this->_channelsyncing) { // let's clean our channel array $this->_channels = array(); $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: ' .'cleaned channel array', __FILE__, __LINE__ ); } if ($this->_usersyncing) { // let's clean our user array $this->_users = array(); $this->log(SMARTIRC_DEBUG_USERSYNCING, 'DEBUG_USERSYNCING: cleaned ' .'user array', __FILE__, __LINE__ ); } if ($this->_logdestination == SMARTIRC_FILE) { fclose($this->_logfilefp); $this->_logfilefp = null; } else if ($this->_logdestination == SMARTIRC_SYSLOG) { closelog(); } return $this; } /** * Reconnects to the IRC server with the same login info, * it also rejoins the channels * * @api * @return boolean|Net_SmartIRC */ public function reconnect() { if ($this->_reconnectdelay > 0) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: delaying ' .'reconnect for '.$this->_reconnectdelay.' ms', __FILE__, __LINE__ ); usleep($this->_reconnectdelay * 1000); } $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: reconnecting...', __FILE__, __LINE__ ); // remember in which channels we are joined $channels = array(); foreach ($this->_channels as $value) { if (empty($value->key)) { $channels[] = array('name' => $value->name); } else { $channels[] = array('name' => $value->name, 'key' => $value->key); } } $this->disconnect(true); if (!$this->connect($this->_address, $this->_port)) { return false; } $this->login($this->_nick, $this->_realname, $this->_usermode, $this->_username, $this->_password ); // rejoin the channels foreach ($channels as $value) { if (isset($value['key'])) { $this->join($value['name'], $value['key']); } else { $this->join($value['name']); } } return $this; } /** * login and register nickname on the IRC network * * Registers the nickname and user information on the IRC network. * * @api * @param string $nick * @param string $realname * @param integer $usermode * @param string $username * @param string $password * @return Net_SmartIRC */ public function login($nick, $realname, $usermode = 0, $username = null, $password = null ) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: logging in', __FILE__, __LINE__ ); $this->_nick = str_replace(' ', '', $nick); $this->_realname = $realname; if ($username !== null) { $this->_username = str_replace(' ', '', $username); } else { $this->_username = str_replace(' ', '', exec('whoami')); } if ($password !== null) { $this->_password = $password; $this->send('PASS '.$this->_password, SMARTIRC_CRITICAL); } if (!is_numeric($usermode)) { $this->log(SMARTIRC_DEBUG_NOTICE, 'DEBUG_NOTICE: login() usermode (' .$usermode.') is not valid, will use 0 instead', __FILE__, __LINE__ ); $usermode = 0; } $this->send('NICK '.$this->_nick, SMARTIRC_CRITICAL); $this->send('USER '.$this->_username.' '.$usermode.' '.SMARTIRC_UNUSED .' :'.$this->_realname, SMARTIRC_CRITICAL ); if (count($this->_performs)) { // if we have extra commands to send, do it now foreach ($this->_performs as $command) { $this->send($command, SMARTIRC_HIGH); } // if we sent "ns auth" commands, we may need to resend our nick $this->send('NICK '.$this->_nick, SMARTIRC_HIGH); } return $this; } //
/** * adds a command to the list of commands to be sent after login() info * * @api * @param string $cmd the command to add to the perform list * @return Net_SmartIRC */ public function perform($cmd) { $this->_performs[] = $cmd; return $this; } /** * sends an IRC message * * Adds a message to the messagequeue, with the optional priority. * $priority: * SMARTIRC_CRITICAL * SMARTIRC_HIGH * SMARTIRC_MEDIUM * SMARTIRC_LOW * * @api * @param string $data * @param integer $priority must be one of the priority constants * @return boolean|Net_SmartIRC */ public function send($data, $priority = SMARTIRC_MEDIUM) { switch ($priority) { case SMARTIRC_CRITICAL: $this->_rawsend($data); break; case SMARTIRC_HIGH: case SMARTIRC_MEDIUM: case SMARTIRC_LOW: $this->_messagebuffer[$priority][] = $data; break; default: $this->log(SMARTIRC_DEBUG_NOTICE, "WARNING: message ($data) " ."with an invalid priority passed ($priority), message is " .'ignored!', __FILE__, __LINE__ ); return false; } return $this; } /** * checks if the passed nickname is our own nickname * * @api * @param string $nickname * @return boolean */ public function isMe($nickname) { return ($nickname == $this->_nick); } /** * checks if we or the given user is joined to the specified channel and returns the result * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isJoined($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isJoined() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if (!isset($this->_channels[strtolower($channel)])) { if ($nickname !== null) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isJoined() is called' .' on a user in a channel we are not joined to!', __FILE__, __LINE__ ); } return false; } if ($nickname === null) { return true; } return isset($this->getChannel($channel)->users[strtolower($nickname)]); } /** * Checks if we or the given user is founder on the specified channel and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isFounder($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isFounder() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if ($nickname === null) { $nickname = $this->_nick; } return ($this->isJoined($channel, $nickname) && $this->getUser($channel, $nickname)->founder ); } /** * Checks if we or the given user is admin on the specified channel and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isAdmin($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isAdmin() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if ($nickname === null) { $nickname = $this->_nick; } return ($this->isJoined($channel, $nickname) && $this->getUser($channel, $nickname)->admin ); } /** * Checks if we or the given user is opped on the specified channel and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isOpped($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isOpped() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if ($nickname === null) { $nickname = $this->_nick; } return ($this->isJoined($channel, $nickname) && $this->getUser($channel, $nickname)->op ); } /** * Checks if we or the given user is hopped on the specified channel and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isHopped($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isHopped() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if ($nickname === null) { $nickname = $this->_nick; } return ($this->isJoined($channel, $nickname) && $this->getUser($channel, $nickname)->hop ); } /** * Checks if we or the given user is voiced on the specified channel and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $nickname * @return boolean */ public function isVoiced($channel, $nickname = null) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isVoiced() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } if ($nickname === null) { $nickname = $this->_nick; } return ($this->isJoined($channel, $nickname) && $this->getUser($channel, $nickname)->voice ); } /** * Checks if the hostmask is on the specified channel banned and returns the result. * ChannelSyncing is required for this. * * @api * @see setChannelSyncing * @param string $channel * @param string $hostmask * @return boolean */ public function isBanned($channel, $hostmask) { if (!$this->_channelsyncing) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isBanned() is called ' .'and the required Channel Syncing is not activated!', __FILE__, __LINE__ ); return false; } return ($this->isJoined($channel) && array_search($hostmask, $this->getChannel($channel)->bans ) !== false ); } /** * Provides a mechanism to interrupt a listen() loop by a bot or something * * @api * @param bool $ival Whether to interrupt the next listen iteration * @return boolean */ public function interrupt($ival = true) { return ($this->_interrupt = $ival); } /** * 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! * * @api * @return Net_SmartIRC */ public function listen() { set_time_limit(0); while ($this->listenOnce() && !$this->_interrupt) {} return $this; } /** * goes into receive mode _only_ for one pass * * Goes into receive mode. It will return when one pass is complete. * Use this when you want to connect to multiple IRC servers. * * @api * @return boolean|Net_SmartIRC */ public function listenOnce() { // if we're not connected, we can't listen, so return if ($this->_updatestate() != SMARTIRC_STATE_CONNECTED) { return false; } // before we listen... if ($this->_loggedin) { // see if any timehandler needs to be called foreach ($this->_timehandler as &$handlerinfo) { $microtimestamp = microtime(true); if ($microtimestamp >= $handlerinfo['lastmicrotimestamp'] + ($handlerinfo['interval'] / 1000.0) ) { $methodobject = &$handlerinfo['object']; $method = $handlerinfo['method']; $handlerinfo['lastmicrotimestamp'] = $microtimestamp; if (method_exists($methodobject, $method)) { $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: ' .'calling method "'.get_class($methodobject).'->' .$method.'"', __FILE__, __LINE__ ); $methodobject->$method($this); } } } // also let's send any queued messages if ($this->_lastsentmsgtime == 0) { $this->_lastsentmsgtime = microtime(true); } $highcount = count($this->_messagebuffer[SMARTIRC_HIGH]); $mediumcount = count($this->_messagebuffer[SMARTIRC_MEDIUM]); $lowcount = count($this->_messagebuffer[SMARTIRC_LOW]); $this->_messagebuffersize = $highcount+$mediumcount+$lowcount; // don't send them too fast if ($this->_messagebuffersize && microtime(true) >= ($this->_lastsentmsgtime+($this->_senddelay/1000)) ) { $result = null; if ($highcount) { $this->_rawsend(array_shift($this->_messagebuffer[SMARTIRC_HIGH])); $this->_lastsentmsgtime = microtime(true); } else if ($mediumcount) { $this->_rawsend(array_shift($this->_messagebuffer[SMARTIRC_MEDIUM])); $this->_lastsentmsgtime = microtime(true); } else if ($lowcount) { $this->_rawsend(array_shift($this->_messagebuffer[SMARTIRC_LOW])); $this->_lastsentmsgtime = microtime(true); } } } // calculate selecttimeout $compare = array($this->_maxtimer, $this->_receivedelay * 1000); if ($this->_mintimer) { $compare[] = $this->_mintimer; } $selecttimeout = ($this->_messagebuffersize != 0) ? $this->_senddelay : min($compare) ; // check the socket to see if data is waiting for us // this will trigger a warning when a signal is received $r = array($this->_socket); $w = null; $e = null; $result = stream_select($r, $w, $e, 0, $selecttimeout); $rawdata = null; if ($result) { // the socket got data to read $rawdata = ''; do { if ($get = fgets($this->_socket)): $rawdata .= $get; endif; $rawlen = strlen($rawdata); } while ($rawlen && $rawdata{$rawlen - 1} != "\n"); } else if ($result === false) { // panic! panic! something went wrong! maybe received a signal. $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: stream_select()' .' returned false, something went wrong!', __FILE__, __LINE__ ); exit; } // no data on the socket $timestamp = time(); if (empty($rawdata)) { if ($this->_lastrx < ($timestamp - $this->_rxtimeout)) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: ' .'receive timeout detected, doing reconnect...', __FILE__, __LINE__ ); $this->_connectionerror = true; } else if ($this->_lasttx < ($timestamp - $this->_txtimeout)) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: ' .'transmit timeout detected, doing reconnect...', __FILE__, __LINE__ ); $this->_connectionerror = true; } } else { $this->_lastrx = $timestamp; // split up incoming lines, remove any empty ones and // trim whitespace off the rest $rawdataar = array_map('trim', array_filter(explode("\r\n", $rawdata))); // parse and handle them foreach ($rawdataar as $rawline) { $this->log(SMARTIRC_DEBUG_IRCMESSAGES, 'DEBUG_IRCMESSAGES: ' ."received: \"$rawline\"", __FILE__, __LINE__ ); // building our data packet $ircdata = new Net_SmartIRC_data(); $ircdata->rawmessage = $rawline; $ircdata->rawmessageex = explode(' ', $rawline); // kept for BC // parsing the message { $prefix = $trailing = ''; $prefixEnd = -1; // parse out the prefix if ($rawline{0} == ':') { $prefixEnd = strpos($rawline, ' '); $prefix = substr($rawline, 1, $prefixEnd - 1); } // parse out the trailing if ($trailingStart = strpos($rawline, ' :')) { // this is not == $trailing = substr($rawline, $trailingStart + 2); } else { $trailingStart = strlen($rawline); } // parse out command and params $params = explode(' ', substr($rawline, $prefixEnd + 1, $trailingStart - $prefixEnd - 1 )); $command = array_shift($params); // } $ircdata->from = $prefix; $ircdata->params = $params; $ircdata->message = $trailing; $ircdata->messageex = explode(' ', $trailing); // parse ident thingy if (preg_match('/^(\S+)!(\S+)@(\S+)$/', $prefix, $matches)) { $ircdata->nick = $matches[1]; $ircdata->ident = $matches[2]; $ircdata->host = $matches[3]; } else { $ircdata->nick = ''; $ircdata->ident = ''; $ircdata->host = $prefix; } // figure out what SMARTIRC_TYPE this message is switch ($command) { case SMARTIRC_RPL_WELCOME: case SMARTIRC_RPL_YOURHOST: case SMARTIRC_RPL_CREATED: case SMARTIRC_RPL_MYINFO: case SMARTIRC_RPL_BOUNCE: $ircdata->type = SMARTIRC_TYPE_LOGIN; break; case SMARTIRC_RPL_LUSERCLIENT: case SMARTIRC_RPL_LUSEROP: case SMARTIRC_RPL_LUSERUNKNOWN: case SMARTIRC_RPL_LUSERME: case SMARTIRC_RPL_LUSERCHANNELS: $ircdata->type = SMARTIRC_TYPE_INFO; break; case SMARTIRC_RPL_MOTDSTART: case SMARTIRC_RPL_MOTD: case SMARTIRC_RPL_ENDOFMOTD: $ircdata->type = SMARTIRC_TYPE_MOTD; break; case SMARTIRC_RPL_NAMREPLY: $ircdata->type = SMARTIRC_TYPE_NAME; if ($params[0] == $this->_nick): $ircdata->channel = $params[2]; else: $ircdata->channel = $params[1]; endif; break; case SMARTIRC_RPL_ENDOFNAMES: $ircdata->type = SMARTIRC_TYPE_NAME; if ($params[0] == $this->_nick): $ircdata->channel = $params[1]; else: $ircdata->channel = $params[0]; endif; break; case SMARTIRC_RPL_WHOREPLY: case SMARTIRC_RPL_ENDOFWHO: $ircdata->type = SMARTIRC_TYPE_WHO; if ($params[0] == $this->_nick): $ircdata->channel = $params[1]; else: $ircdata->channel = $params[0]; endif; break; case SMARTIRC_RPL_LISTSTART: $ircdata->type = SMARTIRC_TYPE_NONRELEVANT; break; case SMARTIRC_RPL_LIST: case SMARTIRC_RPL_LISTEND: $ircdata->type = SMARTIRC_TYPE_LIST; break; case SMARTIRC_RPL_BANLIST: case SMARTIRC_RPL_ENDOFBANLIST: $ircdata->type = SMARTIRC_TYPE_BANLIST; $ircdata->channel = $params[0]; break; case SMARTIRC_RPL_TOPIC: $ircdata->type = SMARTIRC_TYPE_TOPIC; $ircdata->channel = $params[0]; break; case SMARTIRC_RPL_WHOISUSER: case SMARTIRC_RPL_WHOISSERVER: case SMARTIRC_RPL_WHOISOPERATOR: case SMARTIRC_RPL_WHOISIDLE: case SMARTIRC_RPL_ENDOFWHOIS: case SMARTIRC_RPL_WHOISCHANNELS: $ircdata->type = SMARTIRC_TYPE_WHOIS; break; case SMARTIRC_RPL_WHOWASUSER: case SMARTIRC_RPL_ENDOFWHOWAS: $ircdata->type = SMARTIRC_TYPE_WHOWAS; break; case SMARTIRC_RPL_UMODEIS: $ircdata->type = SMARTIRC_TYPE_USERMODE; break; case SMARTIRC_RPL_CHANNELMODEIS: $ircdata->type = SMARTIRC_TYPE_CHANNELMODE; $ircdata->channel = $params[0]; break; case SMARTIRC_ERR_NICKNAMEINUSE: case SMARTIRC_ERR_NOTREGISTERED: $ircdata->type = SMARTIRC_TYPE_ERROR; break; case 'PRIVMSG': if (strspn($ircdata->params[0], '&#+!')) { $ircdata->type = SMARTIRC_TYPE_CHANNEL; $ircdata->channel = $params[0]; break; } if ($ircdata->message{0} == chr(1)) { if (preg_match("/^\1ACTION .*\1\$/", $ircdata->message)) { $ircdata->type = SMARTIRC_TYPE_ACTION; $ircdata->channel = $params[0]; break; } if (preg_match("/^\1.*\1\$/", $ircdata->message)) { $ircdata->type = (SMARTIRC_TYPE_CTCP_REQUEST | SMARTIRC_TYPE_CTCP); break; } } $ircdata->type = SMARTIRC_TYPE_QUERY; break; case 'NOTICE': if (preg_match("/^\1.*\1\$/", $ircdata->message)) { $ircdata->type = (SMARTIRC_TYPE_CTCP_REPLY | SMARTIRC_TYPE_CTCP); break; } $ircdata->type = SMARTIRC_TYPE_NOTICE; break; case 'INVITE': $ircdata->type = SMARTIRC_TYPE_INVITE; break; case 'JOIN': $ircdata->type = SMARTIRC_TYPE_JOIN; $ircdata->channel = $params[0] ?: $ircdata->message; break; case 'TOPIC': $ircdata->type = SMARTIRC_TYPE_TOPICCHANGE; $ircdata->channel = $params[0]; break; case 'NICK': $ircdata->type = SMARTIRC_TYPE_NICKCHANGE; break; case 'KICK': $ircdata->type = SMARTIRC_TYPE_KICK; $ircdata->channel = $params[0]; break; case 'PART': $ircdata->type = SMARTIRC_TYPE_PART; $ircdata->channel = $params[0]; break; case 'MODE': $ircdata->type = SMARTIRC_TYPE_MODECHANGE; $ircdata->channel = $params[0]; break; case 'QUIT': $ircdata->type = SMARTIRC_TYPE_QUIT; break; default: $this->log(SMARTIRC_DEBUG_IRCMESSAGES, 'DEBUG_IRCMESSAGES: ' ."command type UNKNOWN ($command)", __FILE__, __LINE__ ); $ircdata->type = SMARTIRC_TYPE_UNKNOWN; break; } $this->log(SMARTIRC_DEBUG_MESSAGEPARSER, 'DEBUG_MESSAGEPARSER: ' .'ircdata nick:"'.$ircdata->nick .'" ident:"'.$ircdata->ident .'" host:"'.$ircdata->host .'" type:"'.$ircdata->type .'" from:"'.$ircdata->from .'" channel:"'.$ircdata->channel .'" message:"'.$ircdata->message.'"', __FILE__, __LINE__ ); // lets see if we have a messagehandler for it if (is_numeric($command)) { if (!array_key_exists($command, $this->nreplycodes)) { $this->log(SMARTIRC_DEBUG_MESSAGEHANDLER, 'DEBUG_MESSAGEHANDLER: cannot translate unrecognized' ." messagecode $command into a command type", __FILE__, __LINE__ ); $methodname = 'event_' . $command; } else { $methodname = 'event_'.strtolower($this->nreplycodes[$command]); } $_methodname = '_'.$methodname; $_codetype = 'by numeric'; } else { $methodname = 'event_'.strtolower($command); $_methodname = '_'.$methodname; $_codetype = 'by string'; } $found = false; // if exists call internal method for the handling if (method_exists($this, $_methodname)) { $this->log(SMARTIRC_DEBUG_MESSAGEHANDLER, 'DEBUG_MESSAGEHANDLER: ' .'calling internal method "'.get_class($this).'->' .$_methodname.'" ('.$_codetype.')', __FILE__, __LINE__ ); $this->$_methodname($ircdata); $found = true; } // if exists call user defined method for the handling if (method_exists($this, $methodname)) { $this->log(SMARTIRC_DEBUG_MESSAGEHANDLER, 'DEBUG_MESSAGEHANDLER: ' .'calling user defined method "'.get_class($this).'->' .$methodname.'" ('.$_codetype.')', __FILE__, __LINE__ ); $this->$methodname($ircdata); $found = true; } if (!$found) { $this->log(SMARTIRC_DEBUG_MESSAGEHANDLER, 'DEBUG_MESSAGEHANDLER: no' .' method found for "'.$command.'" ('.$methodname.')', __FILE__, __LINE__ ); } // now the actionhandlers are coming foreach ($this->_actionhandler as $i => &$handlerinfo) { $hmsg = $handlerinfo['message']; $regex = ($hmsg{0} == $hmsg{strlen($hmsg) - 1}) ? $hmsg : '/' . $hmsg . '/'; if (($handlerinfo['type'] & $ircdata->type) && preg_match($regex, $ircdata->message) ) { $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: ' ."actionhandler match found for id: $i type: " .$ircdata->type.' message: "'.$ircdata->message ."\" regex: \"$regex\"", __FILE__, __LINE__ ); $methodobject = &$handlerinfo['object']; $method = $handlerinfo['method']; if (method_exists($methodobject, $method)) { $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: calling method "' .get_class($methodobject).'->'.$method.'"', __FILE__, __LINE__ ); $methodobject->$method($this, $ircdata); } else { $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: method doesn\'t exist! "' .get_class($methodobject).'->'.$method.'"', __FILE__, __LINE__ ); } } } unset($ircdata); } } // if we've done anything that didn't work and the connection is broken, // log it and fix it if ($this->_connectionerror) { $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: connection' .' error detected, attempting reconnect!', __FILE__, __LINE__ ); $this->reconnect(); } return $this; } /** * waits for a special message type and returns the answer * * 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. * * @api * @param integer $messagetype see in the documentation 'Message Types' * @param string $regex the pattern to match on * @return array answer from the IRC server for this $messagetype */ public function listenFor($messagetype, $regex = '.*') { $listenfor = new Net_SmartIRC_listenfor(); $this->registerActionHandler($messagetype, $regex, $listenfor, 'handler'); $this->listen(); return $listenfor->result; } /** * 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. * * @api * @see example.php * @param integer $handlertype bits constants, see in this documentation Message Types * @param string $regexhandler the message that has to be in the IRC message in regex syntax * @param object $object a reference to the objects of the method * @param string $methodname the methodname that will be called when the handler happens * @return integer assigned actionhandler id */ public function registerActionHandler($handlertype, $regexhandler, &$object, $methodname ) { // precheck if (!($handlertype & SMARTIRC_TYPE_ALL)) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler' .'type to registerActionHandler()', __FILE__, __LINE__ ); return false; } $id = $this->_actionhandlerid++; $this->_actionhandler[] = array( 'id' => $id, 'type' => $handlertype, 'message' => $regexhandler, 'object' => &$object, 'method' => $methodname, ); $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: ' .'actionhandler('.$id.') registered', __FILE__, __LINE__ ); return $id; } /** * unregisters an existing actionhandler * * @api * @param integer $handlertype * @param string $regexhandler * @param object $object * @param string $methodname * @return boolean */ public function unregisterActionHandler($handlertype, $regexhandler, &$object, $methodname ) { // precheck if (!($handlertype & SMARTIRC_TYPE_ALL)) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler' .'type to unregisterActionHandler()', __FILE__, __LINE__ ); return false; } foreach ($this->_actionhandler as $i => &$handlerinfo) { if ($handlerinfo['type'] == $handlertype && $handlerinfo['message'] == $regexhandler && $handlerinfo['method'] == $methodname ) { $id = $handlerinfo['id']; unset($this->_actionhandler[$i]); $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: ' .'actionhandler('.$id.') unregistered', __FILE__, __LINE__ ); $this->_actionhandler = array_values($this->_actionhandler); return $this; } } $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could ' .'not find actionhandler type: "'.$handlertype.'" message: "' .$regexhandler.'" method: "'.$methodname.'" from object "' .get_class($object).'" _not_ unregistered', __FILE__, __LINE__ ); return false; } /** * unregisters an existing actionhandler via the id * * @api * @param integer|array $id * @return boolean|void */ public function unregisterActionId($id) { if (is_array($id)) { foreach ($id as $each) { $this->unregisterActionId($each); } return $this; } foreach ($this->_actionhandler as $i => &$handlerinfo) { if ($handlerinfo['id'] == $id) { unset($this->_actionhandler[$i]); $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: ' .'actionhandler('.$id.') unregistered', __FILE__, __LINE__ ); $this->_actionhandler = array_values($this->_actionhandler); return $this; } } $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could ' .'not find actionhandler id: '.$id.' _not_ unregistered', __FILE__, __LINE__ ); return false; } /** * 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. * * @api * @see example7.php * @param integer $interval interval time in milliseconds * @param object $object a reference to the objects of the method * @param string $methodname the methodname that will be called when the handler happens * @return integer assigned timehandler id */ public function registerTimeHandler($interval, &$object, $methodname) { $id = $this->_timehandlerid++; $this->_timehandler[] = array( 'id' => $id, 'interval' => $interval, 'object' => &$object, 'method' => $methodname, 'lastmicrotimestamp' => microtime(true), ); $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: timehandler(' .$id.') registered', __FILE__, __LINE__ ); if (($this->_mintimer == false) || ($interval < $this->_mintimer)) { $this->_mintimer = $interval; } return $id; } /** * unregisters an existing timehandler via the id * * @api * @see example7.php * @param integer $id * @return boolean */ public function unregisterTimeId($id) { if (is_array($id)) { foreach ($id as $each) { $this->unregisterTimeId($each); } return $this; } foreach ($this->_timehandler as $i => &$handlerinfo) { if ($handlerinfo['id'] == $id) { unset($this->_timehandler[$i]); $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: ' .'timehandler('.$id.') unregistered', __FILE__, __LINE__ ); $this->_timehandler = array_values($this->_timehandler); $timerarray = array(); foreach ($this->_timehandler as $values) { $timerarray[] = $values->interval; } $this->_mintimer = ( array_multisort($timerarray, SORT_NUMERIC, SORT_ASC) && isset($timerarray[0]) ) ? $timerarray[0] : false; return $this; } } $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: could not ' ."find timehandler id: $id _not_ unregistered", __FILE__, __LINE__ ); return false; } /** * loads a module using preset path and given name * * @api * @param string $name * @return boolean|Net_SmartIRC */ public function loadModule($name) { // is the module already loaded? if (isset($this->_modules[$name])) { $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING! module with the name "' .$name.'" already loaded!', __FILE__, __LINE__ ); return false; } $classname = "Net_SmartIRC_module_$name"; if (class_exists($classname)) { $this->log(SMARTIRC_DEBUG_MODULES, "DEBUG_MODULES: \"$name\" module class" .' exists, initializing...', __FILE__, __LINE__ ); } else { $filename = $this->_modulepath."/$name.php"; if (!file_exists($filename)) { $this->log(SMARTIRC_DEBUG_MODULES, "DEBUG_MODULES: couldn't load " ."module; file \"$filename\" doesn't exist", __FILE__, __LINE__ ); return false; } // pray that there is no parse error, it will kill us! include_once($filename); if (!class_exists($classname)) { $this->log(SMARTIRC_DEBUG_MODULES, "DEBUG_MODULES: class $classname" ." not found in $filename, aborting...", __FILE__, __LINE__ ); return false; } $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: loading module ' ."\"$name\" from file...", __FILE__, __LINE__ ); } $methods = array_flip(get_class_methods($classname)); if (!(isset($methods['__construct']) || isset($methods['module_init']))) { $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: required method ' .$classname.'::__construct() not found, aborting...', __FILE__, __LINE__ ); return false; } if (!(isset($methods['__destruct']) || isset($methods['module_exit']))) { $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: required method ' .$classname.'::__destruct() not found, aborting...', __FILE__, __LINE__ ); return false; } $vars = get_class_vars($classname); $required = array('name', 'description', 'author', 'license'); foreach ($required as $varname) { if (!isset($vars[$varname])) { $this->log(SMARTIRC_DEBUG_NOTICE, 'NOTICE: required module' ."property {$classname}::\${$varname} not found.", __FILE__, __LINE__ ); } } // looks like the module satisfies us, so instantiate it if (isset($methods['module_init'])) { // we're using an old module_init style module $this->_modules[$name] = new $classname; $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: calling ' .$classname.'::module_init()', __FILE__, __LINE__ ); $this->_modules[$name]->module_init($this); } else if (func_num_args() == 1) { // we're using a new __construct style module, which maintains its // own reference to the $irc client object it's being used on $this->_modules[$name] = new $classname($this); } else // we're using new style AND we have args to pass to the constructor if (func_num_args() == 2) { // only one arg, so pass it as is $this->_modules[$name] = new $classname($this, func_get_arg(1)); } else { // multiple args, so pass them in an array $this->_modules[$name] = new $classname($this, array_slice(func_get_args(), 1)); } $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: successfully loaded' ." module: $name", __FILE__, __LINE__ ); return $this; } /** * unloads a module by the name originally loaded with * * @api * @param string $name * @return boolean|Net_SmartIRC */ public function unloadModule($name) { $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: unloading module: ' ."$name...", __FILE__, __LINE__ ); if (isset($this->_modules[$name])) { if (in_array('module_exit', get_class_methods(get_class($this->_modules[$name])) )) { $this->_modules[$name]->module_exit($this); } unset($this->_modules[$name]); $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: successfully' ." unloaded module: $name", __FILE__, __LINE__); return $this; } $this->log(SMARTIRC_DEBUG_MODULES, "DEBUG_MODULES: couldn't unload" ." module: $name (it's not loaded!)", __FILE__, __LINE__ ); return false; } /** * Returns an array of the module names that are currently loaded * * @api * @return array */ public function loadedModules() { return array_keys($this->_modules); } // /** * adds an user to the channelobject or updates his info * * @internal * @param object $channel * @param object $newuser * @return Net_SmartIRC */ protected function _adduser(&$channel, &$newuser) { $lowerednick = strtolower($newuser->nick); if ($this->isJoined($channel->name, $newuser->nick)) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: ' .'updating user: '.$newuser->nick.' on channel: ' .$channel->name, __FILE__, __LINE__ ); // lets update the existing user $currentuser = &$channel->users[$lowerednick]; $props = array('ident', 'host', 'realname', 'ircop', 'founder', 'admin', 'op', 'hop', 'voice', 'away', 'server', 'hopcount' ); foreach ($props as $prop) { if ($newuser->$prop !== null) { $currentuser->$prop = $newuser->$prop; } } } else { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: ' .'adding user: '.$newuser->nick.' to channel: '.$channel->name, __FILE__, __LINE__ ); // he is new just add the reference to him $channel->users[$lowerednick] = &$newuser; } $user = &$channel->users[$lowerednick]; $modes = array('founder', 'admin', 'op', 'hop', 'voice'); foreach ($modes as $mode) { if ($user->$mode) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, "DEBUG_CHANNELSYNCING: adding $mode: ".$user->nick .' to channel: '.$channel->name, __FILE__, __LINE__ ); $ms = $mode.'s'; $channel->{$ms}[$user->nick] = true; } } return $this; } /** * An active-pinging system to keep the bot from dropping the connection * * @internal * @return void */ protected function _pingcheck() { $time = time(); if ($time - $this->_lastrx > $this->_rxtimeout) { $this->reconnect(); $this->_lastrx = $time; } elseif ($time - $this->_lastrx > $this->_rxtimeout/2) { $this->send('PING '.$this->_address, SMARTIRC_CRITICAL); } } /** * sends a raw message to the IRC server * * Don't use this directly! Use message() or send() instead. * * @internal * @param string $data * @return boolean */ protected function _rawsend($data) { if ($this->_updatestate() != SMARTIRC_STATE_CONNECTED) { return false; } $this->log(SMARTIRC_DEBUG_IRCMESSAGES, 'DEBUG_IRCMESSAGES: sent: "' .$data.'"', __FILE__, __LINE__ ); $result = fwrite($this->_socket, $data.SMARTIRC_CRLF); if ($result === false) { // writing to the socket failed, means the connection is broken $this->_connectionerror = true; } else { $this->_lasttx = time(); } return ($result !== false); } /** * removes an user from one channel or all if he quits * * @internal * @param object $ircdata * @return Net_SmartIRC */ protected function _removeuser($ircdata) { if ($ircdata->type & (SMARTIRC_TYPE_PART | SMARTIRC_TYPE_QUIT)) { $nick = $ircdata->nick; } else if ($ircdata->type & SMARTIRC_TYPE_KICK) { $nick = $ircdata->params[1]; } else { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: ' .'unknown TYPE ('.$ircdata->type .') in _removeuser(), trying default', __FILE__, __LINE__ ); $nick = $ircdata->nick; } $lowerednick = strtolower($nick); if ($this->_nick == $nick) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: we left channel: '.$ircdata->channel .' destroying...', __FILE__, __LINE__ ); unset($this->_channels[strtolower($ircdata->channel)]); } else { $lists = array('founders', 'admins', 'ops', 'hops', 'voices'); if ($ircdata->type & SMARTIRC_TYPE_QUIT) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: user '.$nick .' quit, removing him from all channels', __FILE__, __LINE__ ); // remove the user from all channels $channelkeys = array_keys($this->_channels); foreach ($channelkeys as $channelkey) { // loop through all channels $channel = &$this->getChannel($channelkey); foreach ($channel->users as $uservalue) { // loop through all user in this channel if ($nick == $uservalue->nick) { // found him, kill him $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: found him on channel: ' .$channel->name.' destroying...', __FILE__, __LINE__ ); unset($channel->users[$lowerednick]); foreach ($lists as $list) { if (isset($channel->{$list}[$nick])) { // die! $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing him ' ."from $list list", __FILE__, __LINE__ ); unset($channel->{$list}[$nick]); } } } } } } else { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing user: '.$nick .' from channel: '.$ircdata->channel, __FILE__, __LINE__ ); $channel = &$this->getChannel($ircdata->channel); unset($channel->users[$lowerednick]); foreach ($lists as $list) { if (isset($channel->{$list}[$nick])) { $this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: removing him ' ."from $list list", __FILE__, __LINE__ ); unset($channel->{$list}[$nick]); } } } } return $this; } /** * updates and returns the current connection state * * @internal * @return boolean */ protected function _updatestate() { if (is_resource($this->_socket)) { $rtype = get_resource_type($this->_socket); if ($this->_socket !== false && (strtolower($rtype) == 'socket' || $rtype == 'stream') ) { $this->_state = SMARTIRC_STATE_CONNECTED; } } else { $this->_state = SMARTIRC_STATE_DISCONNECTED; $this->_loggedin = false; } return $this->_state; } public function isError($object) // is this even needed/used? { return (is_object($object) && strtolower(get_class($object)) == 'net_smartirc_error' ); } protected function &throwError($message) { return new Net_SmartIRC_Error($message); } } /** * Struct for parsed incoming messages */ class Net_SmartIRC_data { /** * @var string */ public $from; /** * @var string */ public $nick; /** * @var string */ public $ident; /** * @var string */ public $host; /** * @var string */ public $channel; /** * @var array */ public $params = array(); /** * @var string */ public $message; /** * @var array */ public $messageex = array(); /** * @var integer */ public $type; /** * @var string */ public $rawmessage; /** * @var array */ public $rawmessageex = array(); } /** * Struct for individual channel data */ class Net_SmartIRC_channel { /** * @var string */ public $name; /** * @var string */ public $key; /** * @var array */ public $users = array(); /** * @var array */ public $founders = array(); /** * @var array */ public $admins = array(); /** * @var array */ public $ops = array(); /** * @var array */ public $hops = array(); /** * @var array */ public $voices = array(); /** * @var array */ public $bans = array(); /** * @var string */ public $topic; /** * @var string */ public $user_limit = false; /** * @var string */ public $mode; /** * @var integer */ public $synctime_start = 0; /** * @var integer */ public $synctime_stop = 0; /** * @var integer */ public $synctime; } /** * Struct for individual user data */ class Net_SmartIRC_user { /** * @var string */ public $nick; /** * @var string */ public $ident; /** * @var string */ public $host; /** * @var string */ public $realname; /** * @var boolean */ public $ircop; /** * @var boolean */ public $away; /** * @var string */ public $server; /** * @var integer */ public $hopcount; } /** * Struct for extra data that applies to each user in each channel they're in */ class Net_SmartIRC_channeluser extends Net_SmartIRC_user { /** * @var boolean */ public $founder; /** * @var boolean */ public $admin; /** * @var boolean */ public $op; /** * @var boolean */ public $hop; /** * @var boolean */ public $voice; } /** * Struct for data that applies to each user server-wide */ class Net_SmartIRC_ircuser extends Net_SmartIRC_user { /** * @var array */ public $joinedchannels = array(); } /** * Built-in bot used by Net_SmartIRC::listenFor() */ class Net_SmartIRC_listenfor { /** * @var array */ public $result = array(); /** * stores the received answer into the result array * * @api * @param object $irc * @param object $ircdata * @return void */ public function handler(&$irc, &$ircdata) { $irc->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: listenfor handler called', __FILE__, __LINE__ ); $this->result[] = $ircdata; $irc->disconnect(); } } class Net_SmartIRC_Error { private $error_msg; public function __construct($message) { $this->error_msg = $message; } public function getMessage() { return $this->error_msg; } } Net_SmartIRC-1.1.7/CREDITS0000620000175000017500000000237212514342261014416 0ustar ubuntuubuntu This is the creditslist for SmartIRC The fields are: (N) name (E) email (W) web-address (P) PGP key ID and fingerprint (D) description (S) snail-mail address --------------------------- N: Mirco 'meebey' Bauer E: mail@meebey.net E: meebey@php.net W: www.meebey.net P: 5051C9B9 / EF69 07A4 51AD 689E CF0C 767F CD9C 4C1A 5051 C9B9 D: Project Maintainer S: Kroonhorst 42 S: 22549 Hamburg S: Germany N: Garrett Whitehorn W: http://garrettw.net/ D: Project Maintainer as of 2014/02/04 N: Peter Petermann E: webmaster@cyberfly.net W: www.cyberfly.net D: ban/unban diffs N: Andreas Streichardt E: mop@spaceregents.de W: www.spaceregents.de D: several hints for bugfixes D: some patchfiles N: Joern Heissler E: joern@heissler.de W: http://wulf.eu.org/ P: 57C76B66 / 6333 346F D7F4 928D 02B0 FDBF B398 EBC6 57C7 6B66 D: Quality Asurance (QA) D: high improved concept for socket_select() handling S: Willinghusener Weg 100 S: 21509 Glinde S: Germany N: Jani Taskinen E: sniper@php.net D: fixed several bugs N: Ronald Hummelink E: ronaldhummelink@users.sourceforge.net D: reconnect delay patch (sf.net patch #883820) D: autoretry patch (sf.net patch #883821) N: Anatoly Techtonik E: techtonik@users.sourceforge.net D: load socket extension patch (sf.net patch #911993) Net_SmartIRC-1.1.7/FEATURES0000620000175000017500000000314012514342262014532 0ustar ubuntuubuntu Full featurelist of Net_SmartIRC ------------------------------------- - full object-oriented programmed - every received IRC message is parsed into an object (containing the following info: from, nick, ident, host, channel, message, type, rawmessage) - actionhandler for the API (on different types of messages [channel/notice/query/kick/join..], callbacks can be registered) - messagehandler for the API (class-based messagehandling using IRC reply codes) - time events (callbacks to methods in intervals) - send/receive flood protection - detects and changes nickname on nickname collisions - auto-reconnect if connection is lost - auto-retry for initially connecting to IRC servers - debugging/logging system with log levels (destination can be file, stdout, syslog or browserout) - supports fsocks and PHP socket extension - supports PHP as old as 4.4.4 (but not for much longer) - send buffer with a queue that has 3 priority levels (high, medium, low) plus a bypass level (critical) - channel syncing (tracking of users/modes/topic etc in objects) - user syncing (tracking the user in channels, nick/ident/host/realname/server/hopcount in objects) - when channel syncing is activated, the following functions are available: isJoined isFounder isAdmin isOpped isHopped isVoiced isBanned - on reconnect all joined channels will be rejoined, even when keys are used - own CTCP version reply can be set - IRC commands: pass op deop voice devoice ban unban join part action message notice query ctcp mode topic nick invite list names kick who whois whowas quit Net_SmartIRC-1.1.7/LICENSE0000620000175000017500000006346012514342262014411 0ustar ubuntuubuntu GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! Net_SmartIRC-1.1.7/README.md0000620000175000017500000000517612514342262014663 0ustar ubuntuubuntu# [Net_SmartIRC](http://pear.php.net/package/Net_SmartIRC/) [Docs](http://pear.php.net/package/Net_SmartIRC/docs) - [Bugs](http://pear.php.net/package/Net_SmartIRC/bugs) - [Downloads](http://pear.php.net/package/Net_SmartIRC/download) - [Roadmap](http://pear.php.net/bugs/roadmap.php?package=Net_SmartIRC) ## What is this? Net_SmartIRC is a PHP package that helps you communicate with IRC networks in whatever way you might need, whether in a CLI program or as part of a web page. It's also well suited for bot development. ## Goals - To be a fast and full-featured way to interface your PHP code with IRC networks. - To provide a concise, easy-to-use module API to make it do exactly what you want. ## Future plans This package was originally written for PHP 4 (and the code shows it). My aim is to fix all submitted bugs, update the code structure as much as I can without breaking backward compatibility, implement whatever new features are fairly simple to add, and update the documentation and examples. This package will likely be used as a starting point for a new IRC library that uses better OO principles and is even easier to use. -- Garrett W., current maintainer ## How to contribute 1. Read the TODO file or the roadmap on the main package homepage to see what needs doing 2. Fork the repo 3. Make code changes using PEAR Coding Standards 4. Submit pull request 5. Pat yourself on the back ## People involved - [Mirco 'meebey' Bauer] (https://github.com/meebey) - [Amir Mohammad Saied] (http://gluegadget.com/) - [Garrett Whitehorn] (https://github.com/garrettw) - See the package homepage for the official list ## Files included - Net/ - SmartIRC/ - defines.php (Necessary message code defines) - irccommands.php (Basic outgoing message functions) - messagehandler.php (Basic incoming message handlers) - SmartIRC.php (The class itself) - docs/ - examples/ - example.php (a very basic bot that simply responds to a message) - example2.php (how to output number of channel users in a webpage) - example3.php (another basic bot that uses the channel user list to find ops) - example4.php (examines realnames of users in channel) - example5.php (kicks other users on command) - example6.php (greets users when they join the channel) - example7.php (shows how to use timers to do things rather than events) - HTML/ (the full documentation of SmartIRC) - DOCUMENTATION (Appendix to the HTML documention for developers) - HOWTO (Mini howto with detailed information, step by step) - tests/ - composer.json (Eventually this package will be on packagist.org) - package.xml (Package info file generated by PEAR packager)