Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 20.72 KB | None | 0 0
  1. from __future__ import division
  2. from math import ceil
  3. from twisted.words.protocols import irc
  4. from twisted.internet import protocol
  5. from twisted.internet import reactor
  6. import random
  7.  
  8. #give owner more privs, such as forceing votes, forcing leaves etc, maybe give half op so can kick faggots
  9. #start >force command, maybe scrap it
  10. #start >end command
  11. #maybe a >help command for spastics
  12. #read commands, descriptions etc from a xml file
  13. #fix bugs and tidy code
  14. #add colors
  15. #split,killed and lynched, maybe 2d dict
  16.  
  17. oper_pass = ''
  18. ns_pass = ''
  19.  
  20. min_players = 4
  21. min_players_2_wolves = 7
  22. max_players = 12
  23.  
  24. #info make loadable from xml in another class etc
  25.  
  26. roles = {1:'Nigger',2:'Cop',3:'Housewife'}
  27.  
  28. commands = {'lynch':'>lynch','see':'>raid','kill':'>rape'}
  29.  
  30. roles_left = {1:'They left behind a empty bucket of kfc and a half eaten watermelon.',
  31.             2:'They left behind a empty box of donuts.',
  32.             3:'Nothing of value was lost.'}
  33.  
  34. roles_objective = {1:'Your objective is to blend in with the rest of suburbia, once a night,',
  35.                         2:'Your objective is to determine the identity of any %s hiding in suburbia, once a night,' % roles.get(1,None),
  36.                         3:'Your objective is to decide upon who you think is a %s.' % roles.get(1,None)
  37.                 }
  38.                
  39. #role is reminded at night, maybe sca
  40. roles_ability = {1:'you must use %s TARGET to rape a housewife.' % commands.get('kill',None),
  41.             2:'you must use %s TARGET to determine the targets real identity.' % commands.get('see',None),
  42.             3:'Try not to get raped'
  43.             }
  44.  
  45.  
  46. game_intro = ['This is a game of justified paranoia and great truth.  Everyone in this group appears to be a common white suburban housewife, but several of you are \'special\'. One or two of you are actually genuine chicken eating niggers, seeking to rape everyone and everything while concealing their identity.',
  47. 'And one of you is also a \'cop\'; you have the ability to learn whether a specific person is or is not a nigger in disguise.',
  48. 'As a community, your group objective is to weed out the niggers and lynch them like back in the good ol days, before you\'re all raped in your sleep'
  49. ]
  50.  
  51. night_end = 'The night has ended, suburbia awakens to find the dead raped body of:'
  52. night_begin = 'Night time begins in suburbia, everyone sleeps peacfully but niggery is afoot'
  53.  
  54. cant_kill_self = 'You cannot rape yourself.'
  55. cant_kill_wolf = 'You cannot rape another nigger.'
  56.  
  57. cant_see_self = 'You cannot raid yourself'
  58.  
  59. enough_2_wolves = 'There are enough players for 2 niggers'
  60. two_wolves = 'There are two niggers in this game the other nigger is:'
  61.  
  62. lynch_begin = 'Suburbia has made its decision, and has decided to lynch:'
  63.  
  64. #do the even thing? going with determining what roles are left, for added lulz and dickery
  65. wolf_win = 'Suburbia has been thoroughly raped, niggers rein supreme and now no longer hide... there goes the neighborhood.'
  66. village_win = 'Suburbia has been saved and is now rid of all niggers, the suburban dream is safe... for now.'
  67.  
  68. class WolfBot(irc.IRCClient):
  69.    
  70.     def _get_nickname(self):
  71.         return self.factory.nickname
  72.    
  73.     nickname = property(_get_nickname)
  74.  
  75.     def signedOn(self):
  76.         self.sendLine('OPER %s' % oper_pass)
  77.         self.mode(self.factory.nickname,True,'BH',None,None,None)
  78.         self.msg('Nickserv','id %s' % ns_pass)
  79.         self.msg('Operserv', 'set superadmin on')
  80.         self.join(self.factory.channel)
  81.        
  82.     def player_gone(self,user,channel):
  83.         if self.game_schedule:
  84.             del self.players[user]
  85.             self.msg(channel,'%s just disappeared, nothing of value was lost' % user)
  86.         elif self.game:
  87.             role_num = self.players.get(user, None)
  88.             del self.players[user]
  89.             self.msg(channel,'%s just disappeared, %s was a %s, %s' % (user,user,roles[role_num],roles_left[role_num]))
  90.             if role_num == 1:
  91.                 self.wolves.remove(user)
  92.                 if self.wolves and not self.lynch_time:
  93.                     self.wolf_target = None
  94.                     self.killed = False
  95.                     try:
  96.                         del self.wolf_targets[user]
  97.                     except KeyError, e:
  98.                         pass
  99.                     else:
  100.                         #means there was 2, one remains.
  101.                         other_wolf = self.wolves[0]
  102.                         if self.wolf_targets.get(other_wolf,None) == None:
  103.                             self.msg(other_wolf,'Your fellow %s %s has disappeared, continue choosing your target' % (roles[1],user))
  104.                         else:
  105.                             self.msg(other_wolf,'Your fellow %s %s has disappeared, confirm your target' % (roles[1],user))
  106.  
  107.             elif role_num == 2:
  108.                 self.seer = None
  109.  
  110.             if not self.check_winner(channel):
  111.                 if not self.lynch_time:
  112.                     #fix wolf target dissapearing
  113.                     if user == self.wolf_target or user in self.wolf_targets.values(): #hope dont throw error
  114.                         self.killed = False
  115.                         self.wolf_target = None
  116.                         if len(self.wolves) == 2:
  117.                             for k, v in self.wolf_targets.iteritems():
  118.                                 if v == user:
  119.                                     self.wolf_targets[k] = None
  120.                                     self.msg(k,'Your target of choice has disappeared, select a new target')
  121.                         else:
  122.                             self.msg(self.wolves[0],'Your target of choice has disappeared, select a new target')
  123.                            
  124.                 else:
  125.                     #fix votes here
  126.                     if user in self.not_voted:
  127.                         self.not_voted.remove(user)
  128.                     else:
  129.                         #lower the person who they voted fors tally:
  130.                         self.vote_dict[self.player_vote[user]] -= 1
  131.                         del self.player_vote[user]
  132.                     #give the people who voted for user their vote back and append them to self.not_voted, remove them from vote_dict
  133.                     if self.vote_dict[user] > 0:
  134.                         #could listcomp it
  135.                         people = []
  136.                         for k, v in self.player_vote.iteritems():
  137.                             if v == user:
  138.                                 #give the people who voted for user there vote back, and inform them/channel
  139.                                 self.not_voted.append(k)
  140.                                 people.append(k)
  141.                                 self.player_vote[k] = None #bad?
  142.                         self.msg(channel,'Because %s disappeared, the following people who voted for them, must vote again: %s' % (user,', '.join(people)) )
  143.  
  144.                     del self.vote_dict[user]
  145.                     #lower self.majority
  146.                     self.majority -= 1
  147.    
  148.         if user == self.owner: #need to tie this in with line 101 somehow
  149.             self.owner = random.choice(self.players.keys())
  150.             self.msg(channel,'%s was the game owner, %s has become the owner now' % (user,self.owner))
  151.            
  152.         #self.check_winner
  153.    
  154.     def assign_roles(self,channel):
  155.         if len(self.players) >= min_players_2_wolves:
  156.             self.msg(channel,enough_2_wolves)
  157.             self.wolves = random.sample(self.players.keys(),3)
  158.         else:
  159.             self.wolves = random.sample(self.players.keys(),2)
  160.        
  161.         self.seer = random.choice(self.wolves)
  162.         self.wolves.remove(self.seer)
  163.        
  164.         self.mode(channel,True,'m',None,None,None)
  165.         self.mode(channel,True,'v' * len(self.players),None,' '.join([i for i in self.players.keys()]),None)
  166.  
  167.         for player in self.players.keys():
  168.             #self.mode(channel,True,'v',None,player,None)
  169.             if player == self.seer:
  170.                 self.players[player] = 2
  171.             elif player in self.wolves:
  172.                 self.players[player] = 1
  173.             else:
  174.                 self.players[player] = 3
  175.             role_num = self.players.get(player, None)
  176.             self.msg(player,'You are a %s. %s' % (roles[role_num],roles_objective[role_num]))
  177.        
  178.         for line in game_intro:
  179.             self.msg(channel,line)
  180.        
  181.         self.night_begin()
  182.        
  183.     def night_begin(self):
  184.         self.owner_force = False
  185.         self.lynch_time = False
  186.         self.killed = False
  187.         if self.seer:
  188.             self.seen = False
  189.         else:
  190.             self.seen = True
  191.         for player, role_num in self.players.iteritems():
  192.             self.msg(player,roles_ability.get(role_num,None))
  193.             if role_num == 1 and len(self.wolves) == 2:
  194.                 self.msg(player,'%s %s, you must agree on the same targets.' % (two_wolves,self.get_other_wolf(player)))
  195.  
  196.         self.msg(self.factory.channel,night_begin)
  197.        
  198.     def check_night_finished(self):
  199.         channel = self.factory.channel
  200.         if self.seen and self.killed:
  201.             self.mode(channel,False,'v',None,self.wolf_target,None)
  202.             self.msg(channel,'%s %s' % (night_end, self.wolf_target))
  203.             role_num = self.players[self.wolf_target]
  204.             self.msg(channel,'%s was a confirmed %s. %s' % (self.wolf_target,roles[role_num],roles_left[role_num]))
  205.             self.dead.append(self.wolf_target)
  206.             self.msg(channel,'The following players have been killed: %s ...,may they R.I.P' % ', '.join(self.dead))
  207.             self.msg(channel,'As a community your objective now is to use %s TARGET to cast your vote on who you beleive the %s is.' % (commands['lynch'],roles[1]))
  208.            
  209.             self.msg(self.wolf_target,'You are now dead and can no longer take part in this current game.')
  210.             del self.players[self.wolf_target]
  211.             if role_num == 2:
  212.                 self.seer = None
  213.            
  214.             if not self.check_winner(channel):     
  215.                 self.lynch_time = True
  216.                 self.wolf_target = None
  217.                 self.wolf_targets = {}
  218.                
  219.                 self.not_voted = self.players.keys()
  220.                 self.vote_dict = {i:0 for i in self.not_voted}
  221.                 self.player_vote = {}
  222.                
  223.                 num_players = len(self.players)
  224.                 if num_players%2==0:
  225.                     self.majority = int((num_players / 2) + 1)
  226.                 else:
  227.                     self.majority = int(ceil(num_players / 2))
  228.            
  229.  
  230.     def update_vote(self,nick,target,channel):
  231.         self.msg(channel,'%s has vote for %s' % (nick,target))
  232.         #msg current vote tally
  233.         self.msg(channel,'Current votes: %s, a majority of %s is needed' % (', '.join(['%s:%s' % (k,v) for k, v in self.vote_dict.iteritems() if v > 0]),self.majority))
  234.         #if waiting on people to vote:
  235.         if self.not_voted:
  236.             self.msg(channel,'Waiting for: %s to vote.' % ', '.join(self.not_voted))
  237.         else:
  238.             #check majority vote
  239.             if not self.check_votes(channel):
  240.                 self.msg(channel,'Voteing stalemate, either come to a majority decision or %s can now use >force' % self.owner)
  241.             #print 'self.not_voted'
  242.             #if self.vote_dict[target] >= self.majority: #was a get #bad make it loop through and check
  243.             #   print 'we have maj'
  244.             #   self.lynch(target,channel)
  245.             #else:
  246.             #   self.msg(channel,'Voteing stalemate, either come to a majority decision or %s can now use >force' % self.owner)
  247.             #   print 'vote stalemate game owner could use >force now'
  248.             #self.check_majority()
  249.             #check who has majority vote,
  250.             #decide what to do if a stalemate, could probably....
  251.    
  252.     def check_votes(self,channel):
  253.         winner = [k for k, v in self.vote_dict.iteritems() if v >= self.majority]
  254.         if winner:
  255.             self.lynch(winner[0],channel)
  256.             return True
  257.         else:#need the else?
  258.             return False
  259.    
  260.     def lynch(self,target,channel):
  261.         self.mode(channel,False,'v',None,target,None)
  262.         self.msg(channel,'%s %s' % (lynch_begin,target))
  263.         role_num = self.players[target]
  264.         self.msg(channel,'after examining the remains of %s everyone learns that %s was a %s. %s' % (target,target,roles[role_num],roles_left[role_num]))
  265.        
  266.         if role_num == 1:
  267.             self.wolves.remove(target)
  268.         elif role_num == 2:
  269.             self.seer = None
  270.         #refresh variables
  271.         del self.players[target]       
  272.        
  273.         if not self.check_winner(channel):
  274.             self.night_begin()
  275.        
  276.     def check_winner(self,channel):
  277.         if not self.wolves:
  278.             self.msg(channel,village_win)
  279.             self.game_fin(channel)
  280.             return True
  281.         elif len(self.wolves) >= len([k for k, v in self.players.iteritems() if v != 1]):
  282.             self.msg(channel,wolf_win)
  283.             self.game_fin(channel)
  284.             return True
  285.         else:
  286.             return False
  287.            
  288.     def game_fin(self,channel):
  289.         #channel modes
  290.         self.mode(channel,False,'m',None,None,None)
  291.         self.mode(channel,False,'v' * len(self.players),None,' '.join([i for i in self.players.keys()]),None)
  292.        
  293.         #reset all variables to default shit
  294.         self.game = False
  295.         self.game_schedule = False
  296.         self.lynch_time = False
  297.         self.seen = False
  298.         self.killed = False
  299.         self.owner_force = False
  300.         self.dead = []
  301.         self.players = {}
  302.         self.wolf_targets = {}
  303.         self.wolf_target = None
  304.         self.owner = None
  305.        
  306.        
  307.     game = False
  308.     game_schedule = False
  309.     lynch_time = False
  310.     seen = False
  311.     killed = False
  312.     #used to track targets when more than one wolf
  313.     wolf_targets = {}
  314.     wolf_target = None
  315.     dead = []
  316.     owner = None #game owner/starter/founder
  317.     players = {}
  318.     owner_force = False
  319.    
  320.     def userLeft(self, user, channel):
  321.         if user in self.players:
  322.             self.player_gone(user,channel)
  323.            
  324.     def userQuit(self, user, quitMessage):
  325.         if user in self.players:
  326.             self.player_gone(user,self.factory.channel)
  327.        
  328.     def userKicked(self, user, channel, kicker, message):
  329.         if user in self.players:
  330.             self.player_gone(user,channel)
  331.  
  332.     def irc_NICK(self, user, params):
  333.         old_nick = user.split('!')[0]
  334.         new_nick = params[0]
  335.         if old_nick in self.players:
  336.             role = self.players[old_nick]
  337.             if role == 1:
  338.                 self.wolves[self.wolves.index(old_nick)] = new_nick
  339.                 self.wolf_targets[new_nick] = self.wolf_target[old_nick]
  340.                 del self.wolf_target[old_nick]
  341.             elif role == 2:
  342.                 self.seer = new_nick
  343.            
  344.             if old_nick == self.wolf_target:
  345.                 self.wolf_target = new_nick
  346.             if old_nick in self.wolf_targets.values():
  347.                 for k, v in self.wolf_targets.iteritems():
  348.                     if v == old_nick:
  349.                         self.wolf_targets[k] = new_nick
  350.            
  351.             del self.players[old_nick]
  352.             self.players[new_nick] = role
  353.            
  354.             #update votes etc
  355.             if self.lynch_time:
  356.                 if old_nick in self.not_voted:
  357.                     self.not_voted.remove(old_nick)
  358.                     self.not_voted.append(new_nick)
  359.                 else:
  360.                     self.player_vote[new_nick] = self.player_vote[old_nick]
  361.                     del self.player_vote[old_nick]
  362.                 #update vote count for this person
  363.                 self.vote_dict[new_nick] = self.vote_dict[old_nick]
  364.                 del self.vote_dict[old_nick]
  365.            
  366.             if old_nick == self.owner:
  367.                 self.owner = new_nick
  368.             self.notice(new_nick,'Tracked your nick change.')
  369.  
  370.     def privmsg(self, user, channel, msg):
  371.         nick = user.split('!')[0]
  372.         command = msg.split(' ')[0]
  373.         #needs to be faster :o
  374.         #could do handleing here maybe
  375.        
  376.         if command == '>join' and channel == self.factory.channel:
  377.             if self.game and nick in self.players:
  378.                 self.notice(nick,'You are already in the game in progress')
  379.             elif self.game and nick not in self.players:
  380.                 self.notice(nick,'You may not join a game in progress')
  381.             elif self.game_schedule and nick in self.players:
  382.                 self.notice(nick,'You have already joined')
  383.             elif self.game_schedule and nick not in self.players:
  384.                 self.msg(channel,'%s has just joined the game' % nick)
  385.                 self.players[nick] = None
  386.             else:
  387.                 self.notice(nick,'No game at the moment, use >start to begin one')
  388.                
  389.         elif command == '>leave' and channel == self.factory.channel:
  390.             if self.game and nick in self.players:
  391.                 self.notice(nick,'You cant leave a game in progress')
  392.             elif self.game and nick not in self.players:
  393.                 self.notice(nick,'You cant leave a game you\'re not a part of')
  394.             elif self.game_schedule and nick in self.players:
  395.                 del self.players[nick]
  396.                 self.notice(nick,'You have just left the game')
  397.             elif self.game_schedule and nick not in self.players:
  398.                 self.notice(nick,'You cant leave a game you\'re not a part of')
  399.             else:
  400.                 self.notice(nick,'No game at the moment, use >start to begin one')
  401.            
  402.         elif command == '>start' and channel == self.factory.channel:
  403.             #expand
  404.             if self.game or self.game_schedule:
  405.                 self.notice(nick,'Game already in progress')
  406.             else:
  407.                 self.game_schedule = True
  408.                 self.owner = nick
  409.                 self.players[nick] = None
  410.                 self.notice(nick,'You are the game owner, use >begin to begin the game one all players have joined')
  411.                 self.msg(channel,'%s has just started a new game, use >join to join!' % nick)
  412.                
  413.         elif command == '>begin' and channel == self.factory.channel:
  414.             if self.game:
  415.                 self.notice(nick,'Game already in progress')
  416.             elif nick != self.owner and self.game_schedule:
  417.                 self.notice(nick,'Only the game owner can begin the game, current owner: %s' % self.owner)
  418.             elif nick == self.owner and self.game_schedule:
  419.                 if len(self.players) < min_players:
  420.                     self.msg(channel,'Not enough players to begin the new game')
  421.                 else:
  422.                     self.game_schedule = False
  423.                     self.game = True
  424.                     self.msg(channel,'New game starting, assigining roles')
  425.                     self.assign_roles(channel)
  426.             elif not self.game_schedule:
  427.                 self.notice(nick,'No game at the moment, use >start to begin one')
  428.        
  429.         elif command == commands['lynch'] and channel == self.factory.channel:
  430.             if not self.lynch_time:
  431.                 self.notice(nick,'Now is not the time for that')
  432.             else:
  433.                 try:
  434.                     target = msg.split(' ')[1]
  435.                 except IndexError, e:
  436.                     self.notice(nick,'No target given.')
  437.                 else:
  438.                     if target in self.players:
  439.                         if nick == target:
  440.                             self.notice(nick,'You cannot vote for yourself')
  441.                         elif nick in self.not_voted:
  442.                             self.not_voted.remove(nick)
  443.                             self.vote_dict[target] += 1
  444.                             self.player_vote[nick] = target
  445.                             self.notice(nick,'Vote set, current vote: %s' % target)
  446.                             self.update_vote(nick,target,channel)
  447.                         elif self.player_vote.get(nick,None) != target:
  448.                             self.vote_dict[self.player_vote[nick]] -= 1
  449.                             self.player_vote[nick] = target
  450.                             self.vote_dict[target] += 1
  451.                             self.notice(nick,'Vote updated, current vote: %s' % target)
  452.                             self.update_vote(nick,target,channel)  
  453.                         elif self.player_vote.get(nick,None) == target:
  454.                             self.notice(nick,'%s has already got your vote.' % target)
  455.                            
  456.                     elif target in self.dead:
  457.                         self.notice(nick,'You cannot vote for %s, since they are already dead' % target)
  458.                     else:
  459.                         self.notice(nick,'%s isn\'t playing' % target)
  460.  
  461.         elif command == commands['kill'] and channel == self.nickname:
  462.             if self.lynch_time and nick in self.wolves:
  463.                 self.msg(nick,'Now is not the time for that')
  464.             if not self.lynch_time and nick in self.wolves:
  465.                 if self.killed:
  466.                     if len(self.wolves) == 2:
  467.                         self.msg(nick,'You and the other %s have already decided on your target' % roles[1])
  468.                     else:
  469.                         try:
  470.                             target = msg.split(' ')[1]
  471.                         except IndexError, e:
  472.                             self.msg(nick,'No target given')
  473.                         else:
  474.                             if target == nick:
  475.                                 self.msg(nick,cant_kill_self)
  476.                             elif target in self.dead:
  477.                                 self.msg(nick,'%s is already dead' % target)
  478.                             elif target in self.players:
  479.                                 self.msg(nick,'Target updated')
  480.                                 self.wolf_target = target
  481.                                 self.check_night_finished()
  482.                 else:
  483.                     try:
  484.                         target = msg.split(' ')[1]
  485.                     except IndexError, e:
  486.                         self.msg(nick,'No target given')
  487.                     else:
  488.                         if target == nick:
  489.                             self.msg(nick,cant_kill_self)
  490.                         elif target in self.dead:
  491.                             self.msg(nick,'%s is already dead' % target)
  492.                         elif target in self.players and len(self.wolves) != 2:
  493.                             self.msg(nick,'Target set')
  494.                             self.wolf_target = target
  495.                             self.killed = True
  496.                             self.check_night_finished()
  497.                         elif target in self.wolves:
  498.                             self.msg(nick,cant_kill_wolf)
  499.                         elif target in self.players and len(self.wolves) == 2:
  500.                             self.msg(nick,'Target set')
  501.                             self.wolf_targets[nick] = target
  502.                             other_wolf = self.get_other_wolf(nick)
  503.                             if self.wolf_targets.get(other_wolf, None) == target:
  504.                                 self.msg('%s,%s' % (nick,other_wolf),'Target has been agreed on, no going back.') #sake of ease
  505.                                 self.wolf_target = target
  506.                                 self.killed = True
  507.                                 self.check_night_finished()
  508.                             elif self.wolf_targets.get(other_wolf, None) == None:
  509.                                 self.msg(nick,'%s hasn\'t chose a target yet' % other_wolf)
  510.                                 self.msg(other_wolf,'%s has just chosen %s as a target' % (nick,target))
  511.                             else:
  512.                                 self.msg(other_wolf,'%s has just chosen %s as a target' % (nick,target))
  513.                                 self.msg('%s,%s' % (nick,other_wolf),'You have both chosen different targets, you need to agree')
  514.                                
  515.                         else:
  516.                             self.msg(nick,'%s isn\'t playing' % target)
  517.                            
  518.         elif command == commands['see'] and channel == self.nickname:
  519.             if self.lynch_time and nick == self.seer:
  520.                 self.msg(nick,'Now is not the time for that')
  521.             elif not self.lynch_time and nick == self.seer:
  522.                 if self.seen:
  523.                     self.msg(nick,'You have already used your ability for tonight')
  524.                 else:
  525.                     try:
  526.                         target = msg.split(' ')[1]
  527.                     except IndexError, e:
  528.                         self.msg(nick,'No target given')
  529.                     else:
  530.                         if target == nick:
  531.                             self.msg(nick,'%s...try again' % cant_see_self)
  532.                         elif target in self.dead:
  533.                             self.msg(nick,'%s is dead' % target)
  534.                         elif target in self.players:
  535.                             self.msg(nick,'%s is a confirmed %s' % (target, roles[self.players[target]]))
  536.                             self.seen = True
  537.                             self.check_night_finished()
  538.                         else:
  539.                             self.msg(nick,'%s isn\'t playing' % target)
  540.    
  541.     def get_other_wolf(self,user):
  542.         for wolf in self.wolves:
  543.             if wolf != user:
  544.                 return wolf
  545.    
  546.     def ctcpQuery(self, user, channel, messages):
  547.         print 'Faggot is ctcp\'in'
  548.  
  549.  
  550. class WolfBotFactory(protocol.ClientFactory):
  551.     protocol = WolfBot
  552.  
  553.     def __init__(self, channel, nickname='Premium_Bot'):
  554.         self.channel = channel
  555.         self.nickname = nickname
  556.        
  557.     def clientConnectionLost(self, connector, reason):
  558.         connector.connect()
  559.        
  560.     def clientConnectionFailed(self, connector, reason):
  561.         print "Connection failure:", reason
  562.         reactor.stop()
  563.  
  564. if __name__ == '__main__':
  565.     reactor.connectTCP('zeus.skidsr.us', 6667, WolfBotFactory('#venuism'))
  566.     reactor.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement