Ejemplo n.º 1
0
Archivo: main.py Proyecto: Joev-/HoNBot
 def c_quit(self, source, target, args, owner):
     if owner:
         log.notice("%s told me to quit. :(" % source)
         self.bot.is_quitting = True
         self.logout()
     else:
         log.notice("%s is not authorised to use the `quit` command." % source)
Ejemplo n.º 2
0
Archivo: main.py Proyecto: Joev-/HoNBot
 def c_replynick(self, source, target, args, owner):
     rate = round(float(args.split()[0]), 3)
     if owner:
         self.bot.replynick = rate
         log.notice("Nick reply rate set to %.2f%% by %s" % (rate, source))
         response = "Now replying to %.2f%% of messages containing my name" % rate
     else:
         log.notice("%s attempted to change my nick reply rate to %.2f%%." % (source, rate))
         response = "Only owners can change that."
     return response
Ejemplo n.º 3
0
Archivo: main.py Proyecto: Joev-/HoNBot
 def c_leave(self, source, target, args, owner):
     channels = args.split()
     if owner:
         for channel in channels:
             if channel not in self.channels:
                 log.notice("Not in channel %s" % channel)
                 return
             self.leave_channel(channel)
             response = None
     else:
         log.notice("%s attempted to make me leave the channel(s) %s." % (source, ''.join([c for c in channels])))
         response = "Only my owner may make me leave a channel."
     return response
Ejemplo n.º 4
0
Archivo: main.py Proyecto: Joev-/HoNBot
 def c_join(self, source, target, args, owner):
     channels = args.split()
     if owner:
         for channel in channels:
             if channel in self.channels:
                 log.notice("Already in channel %s" % channel)
                 return
             self.join_channel(channel)
             response = None
     else:
         log.notice("%s attempted to invite me to the channel(s) %s." % (source, ''.join([c for c in channels])))
         response = "Only my owner may invite me to join another channel."
     return response