]>
jfr.im git - irc/rizon/acid.git/blob - pyva/src/main/python/registration/registration.py
1 #!/usr/bin/python pseudoserver.py
3 # module for pypseudoserver
4 # written by B (ben@rizon.net)
5 # helpful registration bot!
12 class registration(AcidPlugin
):
14 AcidPlugin
.__init
__(self
)
16 self
.name
= "registration"
17 self
.log
= logging
.getLogger(__name__
)
20 self
.client
= self
.config
.get('registration', 'nick')
23 def onChanModes(self
, prefix
, chan
, modes
):
25 return #ignore all other mode changes, we only want +z for starts
27 me
= self
.inter
.findUser(self
.client
)
31 user
= self
.inter
.findUser(prefix
)
32 if not user
or user
.getNick() != 'ChanServ':
35 self
.log
.debug("Caught a channel registration")
41 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg1'))
42 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg2'))
43 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg3'))
44 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg4'))
45 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg5'))
46 self
.inter
.privmsg(self
.client
, chan
, self
.config
.get('registration', 'reg6'))
49 self
.inter
.privmsg(self
.client
, self
.logchan
, "registration info sent to %s" % chan
)