#define PUSHER_CHANMODES 12
#define PUSHER_TIMESTAMP 13
#define PUSHER_STRING_INDIRECT 14
+#define PUSHER_ACC_ID 15
+#define PUSHER_SERVER_NAME 16
+#define PUSHER_SERVER_NUMERIC 17
void lua_initnickpusher(void) {
int i = 0;
PUSH_NICKPUSHER(PUSHER_LONG, accountts);
PUSH_NICKPUSHER(PUSHER_UMODES, umodes);
PUSH_NICKPUSHER_CUSTOM(PUSHER_COUNTRY, "country");
+ PUSH_NICKPUSHER_CUSTOM(PUSHER_ACC_ID, "accountid");
+ PUSH_NICKPUSHER_CUSTOM(PUSHER_SERVER_NAME, "servername");
+ PUSH_NICKPUSHER_CUSTOM(PUSHER_SERVER_NUMERIC, "servernumeric");
nickpushercount = i;
nickpusher[i].argtype = 0;
case PUSHER_CHANMODES:
lua_pushstring(l, printallmodes(*((channel **)offset)));
break;
+ case PUSHER_ACC_ID:
+ {
+ nick *tnp = (nick *)np;
+ if(IsAccount(tnp) && tnp->auth) {
+ lua_pushlong(l, tnp->auth->userid);
+ } else {
+ lua_pushnil(l);
+ }
+ break;
+ }
case PUSHER_REALUSERS:
{
channel *cp = *((channel **)offset);
lua_pushint(l, (long)((nick *)offset)->exts[geoipext]);
}
break;
+ case PUSHER_SERVER_NAME:
+ lua_pushstring(l, serverlist[homeserver(((nick *)offset)->numeric)].name->content);
+ break;
+ case PUSHER_SERVER_NUMERIC:
+ lua_pushint(l, homeserver(((nick *)offset)->numeric));
+ break;
}
i++;
chanpushercount = i;
chanpusher[i].argtype = 0;
}
+