Changeset 754 for branches/ithildin-1.1
- Timestamp:
- 06/24/06 19:02:03 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/commands/svsmode.c
r753 r754 49 49 channel_t *chan; 50 50 client_t *cp; 51 char **myargv; 52 int myargc; 51 53 52 54 if (check_channame(argv[1]) && (chan = find_channel(argv[1])) != NULL) { … … 59 61 * and treat everything else as a real client mode. */ 60 62 61 if (argc == 4 && !strcmp(argv[2], "+d")) { 62 /* this is so dumb */ 63 SVSID(cp) = str_conv_int(argv[3], 0); 64 } else if (MYCLIENT(cp)) 63 /* They may send a ts along first. We must skip this. */ 64 if (isdigit(*argv[2])) { 65 myargv = argv + 3; /* skip to argv[3] */ 66 myargc = argc - 3; 67 } else { 68 myargv = argv + 2; 69 myargc = argc - 2; 70 } 71 72 if (myargc == 2 && (!strcmp(myargv[0], "+d") || 73 !strcmp(myargv[0], "+T"))) { 74 if (!strcmp(argv[0], "+d")) 75 /* this is so dumb */ 76 SVSID(cp) = str_conv_int(myargv[1], 0); 77 78 sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 79 "%s %s", myargv[0], myargv[1]); 80 return; 81 } 82 if (MYCLIENT(cp)) 65 83 /* Is this our client? If so do the usermode thing. Otherwise 66 84 * just pass along the command, we expect a MODE back when it is 67 85 * processed by the user's server. */ 68 user_mode( cp, cp, argc - 3, argv + 3, true);86 user_mode(NULL, cp, myargc, myargv, true); 69 87 70 /* XXX: For modes with arguments (none exist - yet) we do not 71 * support the idea well. What we really need to do and don't is to 72 * tack on all of argv.. broken. */ 73 if (argc > 3) 74 sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 75 "%s %s", argv[2], argv[3]); 76 else 77 sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 78 "%s", argv[2]); 88 sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", "%s", 89 myargv[0]); 79 90 } 80 91 }
Note: See TracChangeset
for help on using the changeset viewer.
