X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fevent_neonserv_join.c;h=3bf84e8ae77a300d03e0290486b432b67d85bbda;hb=2d9db1adb1946aba00b203f40eff7d5db8163f01;hp=a117c18b0c7afa4145ea63a05c42c46a83864d6a;hpb=0f1dc61921eef1db8e404a5a82372e2d1cd55daa;p=NeonServV5.git diff --git a/src/event_neonserv_join.c b/src/event_neonserv_join.c index a117c18..3bf84e8 100644 --- a/src/event_neonserv_join.c +++ b/src/event_neonserv_join.c @@ -1,3 +1,19 @@ +/* event_neonserv_join.c - NeonServ v5.1 + * Copyright (C) 2011 Philipp Kreil (pk910) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ struct neonserv_event_join_cache { struct ClientSocket *client; @@ -78,6 +94,8 @@ static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanU chanuserrow = mysql_fetch_row(res); } else chanuserrow = NULL; + if(!chanuserrow) + printf_mysql_query("UPDATE `channels` SET `channel_lastvisit` = UNIX_TIMESTAMP() WHERE `channel_id` = '%d'", chan->channel_id); int userflags = (chanuserrow ? atoi(chanuserrow[1]) : 0); int uaccess = ((chanuserrow && !(userflags & DB_CHANUSER_SUSPENDED)) ? atoi(chanuserrow[0]) : 0); //GREETING