]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Add on_invite to lua local.
authorChris Porter <redacted>
Sun, 27 May 2007 17:36:20 +0000 (18:36 +0100)
committerChris Porter <redacted>
Sun, 27 May 2007 17:36:20 +0000 (18:36 +0100)
lua/lua.h
lua/lualocal.c

index 80703272886df13b77301f5cc7fb05f6247cf051..faf422e4bd46b14bcdcb9c09b199dff4062d7e57 100644 (file)
--- a/lua/lua.h
+++ b/lua/lua.h
@@ -22,7 +22,7 @@
 
 /*** defines ************************************/
 
-#define LUA_BOTVERSION "1.72"
+#define LUA_BOTVERSION "1.73"
 #define LUA_CHANFIXBOT "Z"
 #define LUA_OPERCHAN "#twilightzone"
 
index 7a75a21db089ac60e4c4d6af79977d1f832ef86e..1101fb71f04d680279f52d011353e2d8d6dc516f 100644 (file)
@@ -176,6 +176,16 @@ void lua_localnickhandler(nick *target, int type, void **args) {
 
       ln->reconnect = scheduleoneshot(time(NULL) + 1, &lua_reconnectlocal, ln);
 
+      break;
+    case LU_INVITE:
+    /* we were invited, check if someone invited us to PUBLICCHAN */
+      np = (nick *)args[0];
+      c = (channel *)args[1];
+
+      if(!c || !np || !c->index || !c->index->name || !c->index->name->content)
+        return;
+
+      lua_vlpcall(l, ln, "irc_oninvite", "Ns", np, c->index->name->content);
       break;
   }
 }