Bladeren bron

sleep before joining and add a mode() function to Connection: thanks DeltaQuad

tags/v0.1
Ben Kurtovic 13 jaren geleden
bovenliggende
commit
14d7b62e11
2 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. +4
    -0
      irc/connection.py
  2. +2
    -1
      irc/frontend.py

+ 4
- 0
irc/connection.py Bestand weergeven

@@ -69,3 +69,7 @@ class Connection(object):
def join(self, chan):
"""join a channel"""
self.send("JOIN %s" % chan)

def mode(self, chan, level, msg):
"""send a mode message"""
self.send("MODE %s %s %s" % (chan, level, msg))

+ 2
- 1
irc/frontend.py Bestand weergeven

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

## Imports
import re
import re, time

from config.irc import *
from config.secure import *
@@ -70,5 +70,6 @@ def main():
if line[1] == "376":
if NS_AUTH: # if we're supposed to auth to nickserv, do that
connection.say("NickServ", "IDENTIFY %s %s" % (NS_USER, NS_PASS))
time.sleep(3) # sleep for a bit so we don't join channels un-authed
for chan in CHANS: # join all of our startup channels
connection.join(chan)

Laden…
Annuleren
Opslaan