Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / event_neonserv_join.c
index f3e94ae2a993f5c1a58e4c45cba2a46e2d15bc9c..84845f3d9266f0626ff7e58c53d6d0e11b66e158 100644 (file)
@@ -1,5 +1,5 @@
-/* event_neonserv_join.c - NeonServ v5.2
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* event_neonserv_join.c - NeonServ v5.3
+ * Copyright (C) 2011-2012  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
@@ -29,10 +29,11 @@ static void neonserv_event_join(struct ChanUser *chanuser) {
     struct UserNode *user = chanuser->user;
     struct ClientSocket *client = getBotForChannel(chanuser->chan);
     if(!client) return; //we can't "see" this event
-    if(user->flags & USERFLAG_ISBOT) {
-        putsock(client, "MODE %s +o %s", chanuser->chan->name, chanuser->user->nick);
+    if(chanuser->user == client->user) {
+        requestOp(client->user, chanuser->chan);
         return;
     }
+    if(chanuser->user->flags & USERFLAG_ISBOT) return;
     loadChannelSettings(chanuser->chan);
     if(!(chanuser->chan->flags & CHANFLAG_CHAN_REGISTERED)) return;
     char *ban;