]> jfr.im git - irc/rizon/acid.git/commitdiff
pyva:registration - Don't require exactly 6 lines in pyva config. Entry indentation...
authorMilos <redacted>
Sat, 16 Aug 2014 01:09:34 +0000 (03:09 +0200)
committerMilos <redacted>
Fri, 12 Sep 2014 07:42:37 +0000 (09:42 +0200)
pyva/config.example.ini
pyva/pyva/src/main/python/registration/registration.py

index 52465f918057bd2dc801c45bce5747d833f12d81..4d1064cada6ef7efecb0d67a393d45d6aa0d9906 100644 (file)
@@ -36,12 +36,12 @@ nick: py-moo
 
 [registration]
 nick: Welcome
-reg1:Hi, I am a Rizon Help Bot! If this is your first channel, welcome! If not, you can ignore me.
-reg2:Rizon Services have many settings, you should complete the following Rizon University courses:
-reg3:Channel Management 101 - http://tr.im/rizon101
-reg4:Channel Management 102 - http://tr.im/rizon102
-reg5:Adv Channel Modes  300 - http://tr.im/rizon300
-reg6:After reading these, you should be all set, but feel free to join #help if you get stuck. Thanks for flying Rizon!
+text: Hi, I am a Rizon Help Bot! If this is your first channel, welcome! If not, you can ignore me.
+      Rizon Services have many settings, you should complete the following Rizon University courses:
+      Channel Management 101 - http://tr.im/rizon101
+      Channel Management 102 - http://tr.im/rizon102
+      Adv Channel Modes  300 - http://tr.im/rizon300
+      After reading these, you should be all set, but feel free to join #help if you get stuck. Thanks for flying Rizon!
 
 [listbots]
 nick: FunServ
@@ -78,4 +78,3 @@ channel: #a
 [trivia]
 nick: Trivia
 channel: #a
-
index 691527b6ce7dc6392056032fd708e115bed32fff..239215e604d83d7a3524fb0dff14ff96a27ed4b3 100644 (file)
@@ -36,14 +36,8 @@ class registration(AcidPlugin):
                
                me.joinChan(chan)
                
-               
-               #s XXX lol?
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg1'))
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg2'))
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg3'))
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg4'))
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg5'))
-               self.inter.privmsg(self.client, chan, self.config.get('registration', 'reg6'))
+               for line in self.config.get('registration', 'text').split('\n'):
+                       self.inter.privmsg(self.client, chan, line) #line.strip()
 
                #logging fun
                self.inter.privmsg(self.client, self.logchan, "registration info sent to %s" % chan)