Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- import ConfigParser
- class libIRCbot( object ):
- def __init__(self):
- self.connection = null
- def parseCfg( self )
- cfg = ConfigParser.RawConfigParser()
- return cfg.read( './config.cfg' )
- def connect( self, host, post ):
- self.connection = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
- self.connection.connect( ( host, port ) )
- def getHost( self ):
- return self.parseCfg.get( 'irc', 'host' )
- def getPort( self ):
- return self.parseCfg.get( 'irc', 'port' )
- def getBotNick( self ):
- return self.parseCfg.get( 'irc', 'nick' )
- def getBotRealname( self ):
- return self.parseCfg.get( 'irc', 'realname' )
- def getBotIdent( self ):
- return self.parseCfg.get( 'irc', 'ident' )
Add Comment
Please, Sign In to add comment