Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python IRC Client


To connect to the server, use pyic.irc_client, the object returned controls the irc session.

irc = pyic.irc_client(  nick,
                        server,
                        port = 6667,
                        username = "user",
                        username2 = "user",
                        fullname = "user Name",
                        serverpasswd = None,
                        passwd = None          )

Connects to a server and creates a IRC session.

irc.get_motd( )

Returns the message of the day.

irc.refresh_motd( )

Ask for a new message of the day.

irc.join( channel, password = None )

Joins a channel.

irc.sendmsg( to ,message )

Sends a message to a user or channel.

irc.notice( to ,message )

Like sendmsg( ) but MUSN'T be automatically answered.

userlist = irc.get_users( channel )

Returns a list of users in a given channel.

irc.change_nick( nick )

Uses a new nick

irc.quit( msg = "Client quit" )

Quits the server with a message.

irc.quit_channel( channel )

Quits the channel.

irc.kick( channel, nick, comment = None )

Kicks someone from a channel.

irc.invite( nick, channel )

Invites someone to a channel.

chanlist = irc.get_channels( )

Retrieves a channel list, returned as an tuple( chanel name, user number, topic ) array.

topic = irc.get_topic( channel )

Retrieves the channel topic.

irc.set_topic( channel, topic )

Changes the channel topic.

irc.set_mode( mode )

Set's own mode.

irc.set_chanmode( channel, mode, data = None )

Changes the chanel mode aditional data goes throught data.

data = irc.whois( user )

data = irc.whowas( user )

Retrieves data from current or former users, returned as a dictionary:

{ 'server_info': Server information
'idle': 'seconds idle, signon time'
'real_name': Real user name
'channels': Array of channels where the user is ?
'nick': User nick
'host': Host address
'user': User name
'time': Time connected
'server': Server where is connected
}

About

[Simple] Python IRC Client library

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages