Skip to content
nemunaire edited this page Sep 8, 2014 · 2 revisions

The Server class manage connection to an IRC server and receive messages.

In a normal use, you probably will not use or interact with this class.

Commonly used ...

Methods

In any case you should directly use methods provided by this class.

Properties and attributes

id

This attribute contain the Server ID used in the program to designate this server.

partner

If you delegate some tasks to another bot, you will use this attribute to access is name.

Other ...

Properties and attributes

Self documented

Methods

send_msg

Send a normal message to a given channel; before send, checks that the name given is a known and accepted channel.

send_global

Send a normal message on each known and accepted channel of this server.

send_msg_usr

Send a private message to the given user; checks that the name given is not a channel name.

send_msg_prtn

Send a private message to the partner bot.

send_msg_final

This is the final function which really send message to the given channel or nick without any verification.

disconnect

Close the connection with the server.

kill

Stop the loop and simulate a close but doesn't shutdown the socket (use for hotswap).

join

Join a channel if it is not already in the list. You can precise a password.

leave

Leave a channel if it is in the list.

update_mods

Update the list of loaded modules.

launch

If the server is not already connected, launch the server thread.

run

Main method which connect and wait for messages.