]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/luacommands.c
Update README.
[irc/quakenet/newserv.git] / lua / luacommands.c
index 6af089d19cf981bc892f09f3be2738b94a66a9cc..1d96ac66d9c4d2283be5dff26bb60a55c0cf95fd 100644 (file)
@@ -17,6 +17,7 @@
 #include "../lib/irc_string.h"
 #include "../lib/flags.h"
 #include "../authext/authext.h"
+#include "../glines/glines.h"
 
 #include "lua.h"
 #include "luabot.h"
@@ -220,7 +221,6 @@ static int lua_gline(lua_State *ps) {
   nick *target;
   char mask[512];
   int duration, usercount = 0;
-  host *hp;
   
   if(!lua_isstring(ps, 1) || !lua_isint(ps, 2) || !lua_isstring(ps, 3))
     LUA_RETURN(ps, LUA_FAIL);
@@ -237,10 +237,10 @@ static int lua_gline(lua_State *ps) {
   if(!target || (IsOper(target) || IsXOper(target) || IsService(target)))
     LUA_RETURN(ps, LUA_FAIL);
 
-  if(glinebynick(target, duration, reason, GLINE_SIMULATE) > 50)
+  if(glinebynick(target, duration, reason, GLINE_SIMULATE, "lua") > 50)
     LUA_RETURN(ps, LUA_FAIL);
 
-  usercount = glinebynick(target, duration, reason, 0);
+  usercount = glinebynick(target, duration, reason, 0, "lua");
   LUA_RETURN(ps, lua_cmsg(LUA_PUKECHAN, "lua-GLINE: %s (%d users, %d seconds -- %s)", mask, usercount, duration, reason));
 }