-
Notifications
You must be signed in to change notification settings - Fork 1
users
fro_ozen edited this page Jul 25, 2015
·
3 revisions
All of the following are located in the modules pybot.users
A User_data object represents all the known data about the channels and users of an Irc_server object.
class User_data(object):
# Methods
def get_user(self, nick) # Return the User object corresponding to nick
def get_channel(self, channel) # Return the Channel object corresponding to channel
A User_data can be created by passing it the Irc_server object it corresponds to:
user_data = User_data(server)
A User represents an IRC user.
class User(object):
# Attributes
self.nick # The users nickname
self.channels # A list of the users channels as strings
self.host # The users host
A User can be create by passing it its nickname:
user = User("cool_guy_99")
A Channel represents an IRC channel.
class Channel(object):
self.name # The channels name
self.users # List of User objects currently present in channel
self.ops # List of ops currently present in channel
A Channel can be created by passing it its name:
channel = Channel("#python")