]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/proto-p10.c
Try again to correct the issue. :/
[irc/evilnet/x3.git] / src / proto-p10.c
index 82bd7cf943cc18dc21d6c0ce3a96bf797a57b8aa..0ff72b9acd48ae791156a0e1cde4405d18bce537 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
+#include "nickserv.h"
 #include "chanserv.h"
 #include "proto-common.c"
 
@@ -430,6 +431,18 @@ irc_user(struct userNode *user)
     }
 }
 
+void
+irc_rename(struct userNode *user, const char *new_handle)
+{
+    putsock("%s " P10_ACCOUNT " %s M %s", self->numeric, user->numeric, new_handle);
+}
+
+void
+irc_delete(struct userNode *user)
+{
+    putsock("%s " P10_ACCOUNT " %s U", self->numeric, user->numeric);
+}
+
 void
 irc_account(struct userNode *user, const char *stamp, time_t timestamp)
 {
@@ -714,6 +727,16 @@ irc_mode(struct userNode *from, struct chanNode *target, const char *modes)
             target->name, modes, target->timestamp);
 }
 
+/* Added to allow services to mode users
+   2005 - 8 - 10 by Life4Christ
+*/
+void
+irc_umode(struct userNode *target, const char *modes)
+{
+    putsock("%s " P10_MODE " %s %s ",self->numeric,target->nick, modes);
+}
+
+
 void
 irc_invite(struct userNode *from, struct userNode *who, struct chanNode *to)
 {
@@ -1705,6 +1728,8 @@ init_parse(void)
     dict_insert(irc_func_dict, TOK_MARK, cmd_dummy);
     /* Ignore privs */
     dict_insert(irc_func_dict, TOK_PRIVS, cmd_dummy);
+    /* Ignore remote luser */
+    dict_insert(irc_func_dict, TOK_LUSERS, cmd_dummy);
     /* We have reliable clock!  Always!  Wraaa! */
     dict_insert(irc_func_dict, CMD_SETTIME, cmd_dummy);
     dict_insert(irc_func_dict, TOK_SETTIME, cmd_dummy);
@@ -2079,6 +2104,10 @@ AddUser(struct server* uplink, const char *nick, const char *ident, const char *
     for (n=0; n<nuf_used; n++)
         if (nuf_list[n](uNode))
             break;
+
+    if ((uNode->loc == 1) && (uNode->handle_info))
+        send_func_list(uNode);
+
     return uNode;
 }
 
@@ -2134,8 +2163,9 @@ DelUser(struct userNode* user, struct userNode *killer, int announce, const char
         free_user(user);
 }
 
+static void call_oper_funcs(struct userNode *user);
+
 void mod_usermode(struct userNode *user, const char *mode_change) {
-    static void call_oper_funcs(struct userNode *user);
     int add = 1;
     const char *word = mode_change;
 
@@ -2150,7 +2180,6 @@ void mod_usermode(struct userNode *user, const char *mode_change) {
        case '+': add = 1; break;
        case '-': add = 0; break;
        case 'o':
-           do_user_mode(FLAGS_OPER);
            if (add) {
                 if(!IsOper(user)) { /* Dont re-oper an oper */
                     userList_append(&curr_opers, user);
@@ -2159,6 +2188,7 @@ void mod_usermode(struct userNode *user, const char *mode_change) {
            } else {
                userList_remove(&curr_opers, user);
            }
+           do_user_mode(FLAGS_OPER);
            break;
        case 'O': do_user_mode(FLAGS_LOCOP); break;
        case 'i': do_user_mode(FLAGS_INVISIBLE);