Skip to content
Browse files

Add server/port as argument for the class Bot

  • Loading branch information...
1 parent 7a0ee72 commit e15eea83b0ea111bef70801504721b4bceb7f102 @pythonsnake pythonsnake committed Jan 11, 2012
Showing with 6 additions and 4 deletions.
  1. +5 −3 classes/bot.py
  2. +1 −1 main.py
View
8 classes/bot.py
@@ -27,21 +27,23 @@
class Bot:
"""This is the bot."""
- def __init__(self, sock):
+ def __init__(self, sock, ss, pp=6667):
"""Initialization;
Attributes:
Logging
[start]: start time
[channel]: joined channels
Identification
[nick]![ident]@hostmask: [realname]
- [server]: server to connect
+ [ss]: server to connect
+ [pp]: port of server [ss]
+ default value: 6667
[owner]: hostmask of the owner
[s]: the socket to use
"""
self.start = time()
- self.server = ("holmes.freenode.net", 6667)
+ self.server = (ss, pp)
self.nick = 'JouhouNeko'
self.realname = '=3'
self.ident = 'cat'
View
2 main.py
@@ -26,7 +26,7 @@
from classes.bot import Bot
from socket import socket
-jouhou_neko = Bot(socket())
+jouhou_neko = Bot(socket(), 'irc.irchighway.net')
if __name__ == '__main__':
jouhou_neko('#openneko,##onewhohelps')

0 comments on commit e15eea8

Please sign in to comment.
Something went wrong with that request. Please try again.