Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [IRC]
- ServerAddress: irc.freenode.org
- ServerPort: 6667
- ServerPassword:
- NickName: sp0ckkB0t
- Channels: testytest,pilife
- ---
- import ConfigParser
- class sBotConfiguration():
- _configFile = "sBot.config"
- def __init__(self):
- self._config = ConfigParser.RawConfigParser()
- try:
- self._config.read(self._configFile)
- except ConfigParser.ParsingError:
- print "Error! Unable to parse/read/open the configuration file %s" % self._configFile
- self.ServerAddress = self._config.get('IRC', 'ServerAddress')
- self.ServerPort = self._config.getint('IRC', 'ServerPort')
- self.ServerPassword = self._config.get('IRC', 'ServerPassword')
- self.Channels = self._config.get('IRC', 'Channels')
- self.NickName = self._config.get('IRC', 'NickName')
Add Comment
Please, Sign In to add comment