]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/luacommands.c
move some more data/log paths missed before
[irc/quakenet/newserv.git] / lua / luacommands.c
index 0ad3267c536847010315ecaec2ff9af0a795664a..205bafc4f0f852ebed9f386d319e61f053a28a76 100644 (file)
@@ -38,8 +38,8 @@ struct lua_pusher nickpusher[MAX_PUSHER];
 struct lua_pusher chanpusher[MAX_PUSHER];
 int nickpushercount, chanpushercount;
 
-INLINE void lua_setuppusher(struct lua_pusher *pusherlist, lua_State *l, int index, struct lua_pusher **lp, int max, int pcount);
-INLINE int lua_usepusher(lua_State *l, struct lua_pusher **lp, void *np);
+void lua_setuppusher(struct lua_pusher *pusherlist, lua_State *l, int index, struct lua_pusher **lp, int max, int pcount);
+int lua_usepusher(lua_State *l, struct lua_pusher **lp, void *np);
 
 void lua_initnickpusher(void);
 void lua_initchanpusher(void);
@@ -260,7 +260,7 @@ static int lua_gline(lua_State *ps) {
     snprintf(mask, sizeof(mask), "*@%s", IPtostr(target->p_ipaddr));
   }
 
-  irc_send("%s GL * +%s %d :%s", mynumeric->content, mask, duration, reason);
+  irc_send("%s GL * +%s %d %jd :%s", mynumeric->content, mask, duration, (intmax_t)getnettime(), reason);
   LUA_RETURN(ps, lua_cmsg(LUA_PUKECHAN, "lua-GLINE: %s (%d users, %d seconds -- %s)", mask, usercount, duration, reason));
 }
 
@@ -370,6 +370,12 @@ static int lua_basepath(lua_State *ps) {
   return 1;
 }
 
+static int lua_botnick(lua_State *ps) {
+  lua_pushstring(ps, luabotnick->content);
+
+  return 1;
+}
+
 /* O(n) */
 static int lua_getuserbyauth(lua_State *l) {
   const char *acc;
@@ -846,6 +852,7 @@ void lua_registercommands(lua_State *l) {
   lua_register(l, "chanmsg", lua_chanmsg);
   lua_register(l, "versioninfo", lua_versioninfo);
   lua_register(l, "basepath", lua_basepath);
+  lua_register(l, "botnick", lua_botnick);
 
   lua_register(l, "irc_report", lua_chanmsg);
   lua_register(l, "irc_ctcp", lua_ctcp);
@@ -966,7 +973,7 @@ void lua_initnickpusher(void) {
   nickpusher[i].argtype = 0;
 }
 
-INLINE void lua_setuppusher(struct lua_pusher *pusherlist, lua_State *l, int index, struct lua_pusher **lp, int max, int pcount) {
+void lua_setuppusher(struct lua_pusher *pusherlist, lua_State *l, int index, struct lua_pusher **lp, int max, int pcount) {
   int current = 0;
 
   if(max > 0)
@@ -995,7 +1002,7 @@ INLINE void lua_setuppusher(struct lua_pusher *pusherlist, lua_State *l, int ind
   lp[current] = NULL;
 }
 
-INLINE int lua_usepusher(lua_State *l, struct lua_pusher **lp, void *np) {
+int lua_usepusher(lua_State *l, struct lua_pusher **lp, void *np) {
   int i = 0;
 
   while(*lp) {