]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/lualocal.c
fix makefile of jupe module
[irc/quakenet/newserv.git] / lua / lualocal.c
index 1bd16b02a4a126e06670d7176b3625f0e4296451..983103896f3c3fdab0834083c34044c2b87b928d 100644 (file)
@@ -37,7 +37,7 @@ static int lua_registerlocaluser(lua_State *ps) {
   if(!l)
     return 0;
 
-  ln = (lua_localnick *)malloc(sizeof(lua_localnick));
+  ln = (lua_localnick *)luamalloc(sizeof(lua_localnick));
   if(!ln)
     return 0;
 
@@ -45,7 +45,7 @@ static int lua_registerlocaluser(lua_State *ps) {
 
   ln->nick = registerlocaluser(nickname, ident, hostname, realname, account, modes, &lua_localnickhandler);
   if(!ln->nick) {
-    free(ln);
+    luafree(ln);
     return 0;
   }
 
@@ -67,7 +67,7 @@ void lua_freelocalnick(lua_State *ps, lua_localnick *l, char *quitm) {
 
   luaL_unref(ps, LUA_REGISTRYINDEX, l->handler);
 
-  free(l);
+  luafree(l);
 }
 
 int lua_getlocalnickbynick(nick *np, lua_list **rl, lua_localnick **rln) {
@@ -352,7 +352,7 @@ static int lua_localprivmsg(lua_State *ps) {
 static int lua_localovmode(lua_State *l) {
   nick *source;
   channel *chan;
-  int state = 0, add, realmode, ignoring = 0;
+  int state = 0, add = 0, realmode = 0, ignoring = 0;
   modechanges changes;
 
   if(!lua_islong(l, 1) || !lua_isstring(l, 2) || !lua_istable(l, 3))