Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Module toc :: Class TOC |
|
BaseProtocol
--+ |Protocol
--+ | TOC
Method Summary | |
---|---|
_debug(self,
data)
| |
authorize(self,
server,
port,
username,
password)
| |
Update the buddy. | |
canContact(self,
user)
| |
chatInvite(self,
room,
user,
message)
| |
chatJoin(self,
room)
| |
chatLeave(self,
room)
| |
chatMessage(self,
room,
user,
message)
| |
chatUserUpdate(self,
room,
user)
| |
chatWhisper(self,
room,
user,
message)
| |
connectionLost(self,
reason)
| |
Called when a connection is made. | |
Called whenever data is received. | |
evilFrom(self,
user)
| |
getStatus(self,
user)
| |
Called when you get an IM. | |
tests to see if a flap is actually on the buffer | |
modeConnected(self)
| |
modeFlapon(self)
| |
modeSignon(self)
| |
modeTocSignon(self)
| |
read the first FLAP off self._buf, raising errors if it isn't in the right form. | |
send an error to the user. | |
send a FLAP to the client | |
adds users to the buddy list | |
adds users to the deny list. | |
adds users to the permit list. | |
toc_change_passwd(self,
data)
| |
accept an invitation. | |
invite others to the room. | |
joins the chat room. | |
leave the room. | |
send a message to the chat room. | |
toc_chat_whisper(self,
data)
| |
warns a user. | |
change the format of your nickname. | |
get the user info for a user | |
called when all the setup is done. | |
removes users from the buddy list | |
incoming instant message | |
set/unset away message | |
set the saved config. | |
set/unset idle | |
set the users information, retrivable with toc_get_info | |
toc_unknown(self,
tocname,
data)
| |
Update the users who have us on their buddylist. | |
Inherited from Protocol | |
(Deprecated) | |
Inherited from BaseProtocol | |
Make a connection to a transport and a server. |
Class Variable Summary | |
---|---|
dict |
users = {}
|
Inherited from Protocol | |
tuple |
__implements__ = (<class twisted.internet.interfaces.IPr...
|
Inherited from BaseProtocol | |
int |
connected = 0 |
NoneType |
transport = None |
Method Details |
---|
buddyUpdate(self, user)Update the buddy. Called from updateUsers() |
connectionMade(self)Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
dataReceived(self, data)Called whenever data is received. Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.
|
hearWhisper(self, user, data, auto=0)Called when you get an IM. If auto=1, it's an autoreply from an away message. |
isFlap(self)tests to see if a flap is actually on the buffer |
readFlap(self)read the first FLAP off self._buf, raising errors if it isn't in the right form. the FLAP is the basic TOC message format, and is logically equivilant to a packet in TCP |
sendError(self, code, *varargs)send an error to the user. listing of error messages is below. |
sendFlap(self, type, data)send a FLAP to the client |
toc_add_buddy(self, data)adds users to the buddy list toc_add_buddy <buddyname1> [<buddyname2>] [<buddyname3>]... |
toc_add_deny(self, data)adds users to the deny list. if the list is null, then set the mode to PERMITALL |
toc_add_permit(self, data)adds users to the permit list. if the list is null, then set the mode to DENYALL |
toc_chat_accept(self, data)accept an invitation. toc_chat_accept <room id> |
toc_chat_invite(self, data)invite others to the room. toc_chat_invite <room id> <invite message> <buddy 1> [<buddy2>]... |
toc_chat_join(self, data)joins the chat room. toc_chat_join <exchange> <room name> |
toc_chat_leave(self, data)leave the room. toc_chat_leave <room id> |
toc_chat_send(self, data)send a message to the chat room. toc_chat_send <room id> <message> |
toc_evil(self, data)warns a user. toc_evil <username> <anon|norm> |
toc_format_nickname(self, data)change the format of your nickname. toc_format_nickname <new format> |
toc_get_info(self, data)get the user info for a user toc_get_info <username> |
toc_init_done(self, data)called when all the setup is done. toc_init_done |
toc_remove_buddy(self, data)removes users from the buddy list toc_remove_buddy <buddyname1> [<buddyname2>] [<buddyname3>]... |
toc_send_im(self, data)incoming instant message toc_send_im <screenname> <quoted message> [auto] |
toc_set_away(self, data)set/unset away message toc_set_away [<away message>] |
toc_set_config(self, data)set the saved config. this gets send when you log in. toc_set_config <config> |
toc_set_idle(self, data)set/unset idle toc_set_idle <seconds> |
toc_set_info(self, data)set the users information, retrivable with toc_get_info toc_set_info <user info (quoted)> |
updateUsers(self)Update the users who have us on their buddylist. Called when the user changes anything (idle,away) so people can get updates. |
Class Variable Details |
---|
users
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:45 2004 | http://epydoc.sf.net |