]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Make P join #tlz.
authorChris Porter <redacted>
Thu, 5 Jul 2007 01:58:10 +0000 (03:58 +0200)
committerChris Porter <redacted>
Thu, 5 Jul 2007 01:58:10 +0000 (03:58 +0200)
proxyscan/proxyscan.c

index cc31bba6a58644483e743bbeab847e3f33b89273..ec3a89f7ae396d4cefc140308bcf46beface6bd8 100644 (file)
 #include <string.h>
 #include "../irc/irc.h"
 #include "../lib/irc_string.h"
+#include "../lib/version.h"
+#include "../channel/channel.h"
+#include "../localuser/localuserchannel.h"
+
+MODULE_VERSION("")
 
 #define SCANTIMEOUT      60
 
@@ -240,6 +245,7 @@ void _init(void) {
 void registerproxyscannick(void *arg) {
   sstring *psnick,*psuser,*pshost,*psrealname;
   /* Set up our nick on the network */
+  channel *cp;
 
   psnick=getcopyconfigitem("proxyscan","nick","P",NICKLEN);
   psuser=getcopyconfigitem("proxyscan","user","proxyscan",USERLEN);
@@ -255,6 +261,14 @@ void registerproxyscannick(void *arg) {
   freesstring(psuser);
   freesstring(pshost);
   freesstring(psrealname);
+
+  cp=findchannel("#twilightzone");
+  if (!cp) {
+    localcreatechannel(proxyscannick,"#twilightzone");
+  } else {
+    localjoinchannel(proxyscannick,cp);
+    localgetops(proxyscannick,cp);
+  }
 }
 
 void _fini(void) {