52 |
|
#include "parse.h" |
53 |
|
#include "watch.h" |
54 |
|
|
55 |
– |
|
56 |
– |
struct Callback *entering_umode_cb = NULL; |
57 |
– |
struct Callback *umode_cb = NULL; |
58 |
– |
|
55 |
|
static char umode_buffer[IRCD_BUFSIZE]; |
56 |
|
|
57 |
|
static void user_welcome(struct Client *); |
72 |
|
int number; |
73 |
|
}; |
74 |
|
|
75 |
< |
static dlink_list support_list = { NULL, NULL, 0 }; |
76 |
< |
MessageFile *isupportFile; |
75 |
> |
static dlink_list support_list; |
76 |
> |
static dlink_list support_list_lines; |
77 |
|
|
78 |
|
/* memory is cheap. map 0-255 to equivalent mode */ |
79 |
< |
unsigned int user_modes[256] = |
79 |
> |
const unsigned int user_modes[256] = |
80 |
|
{ |
81 |
|
/* 0x00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x0F */ |
82 |
|
/* 0x10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x1F */ |
85 |
|
0, /* @ */ |
86 |
|
0, /* A */ |
87 |
|
0, /* B */ |
88 |
< |
UMODE_CCONN_FULL, /* C */ |
88 |
> |
0, /* C */ |
89 |
|
UMODE_DEAF, /* D */ |
90 |
|
0, /* E */ |
91 |
< |
0, /* F */ |
91 |
> |
UMODE_FARCONNECT, /* F */ |
92 |
|
UMODE_SOFTCALLERID, /* G */ |
93 |
|
UMODE_HIDDEN, /* H */ |
94 |
|
0, /* I */ |
101 |
|
0, /* P */ |
102 |
|
0, /* Q */ |
103 |
|
UMODE_REGONLY, /* R */ |
104 |
< |
0, /* S */ |
104 |
> |
UMODE_SSL, /* S */ |
105 |
|
0, /* T */ |
106 |
|
0, /* U */ |
107 |
|
0, /* V */ |
134 |
|
UMODE_UNAUTH, /* u */ |
135 |
|
0, /* v */ |
136 |
|
UMODE_WALLOP, /* w */ |
137 |
< |
0, /* x */ |
137 |
> |
UMODE_HIDDENHOST, /* x */ |
138 |
|
UMODE_SPY, /* y */ |
139 |
|
UMODE_OPERWALL, /* z 0x7A */ |
140 |
|
0,0,0,0,0, /* 0x7B - 0x7F */ |
242 |
|
void |
243 |
|
show_isupport(struct Client *source_p) |
244 |
|
{ |
245 |
< |
send_message_file(source_p, isupportFile); |
245 |
> |
const dlink_node *ptr = NULL; |
246 |
> |
|
247 |
> |
DLINK_FOREACH(ptr, support_list_lines.head) |
248 |
> |
sendto_one(source_p, form_str(RPL_ISUPPORT), me.name, |
249 |
> |
source_p->name, ptr->data); |
250 |
|
} |
251 |
|
|
252 |
|
/* |
287 |
|
|
288 |
|
if (ConfigFileEntry.ping_cookie) |
289 |
|
{ |
290 |
< |
if (!IsPingSent(source_p) && source_p->localClient->random_ping == 0) |
290 |
> |
if (!IsPingSent(source_p) && !source_p->localClient->random_ping) |
291 |
|
{ |
292 |
|
do |
293 |
|
source_p->localClient->random_ping = genrand_int32(); |
310 |
|
if (!check_client(source_p)) |
311 |
|
return; |
312 |
|
|
313 |
< |
if (valid_hostname(source_p->host) == 0) |
313 |
> |
if (!valid_hostname(source_p->host)) |
314 |
|
{ |
315 |
|
sendto_one(source_p, ":%s NOTICE %s :*** Notice -- You have an illegal " |
316 |
|
"character in your hostname", me.name, source_p->name); |
393 |
|
} |
394 |
|
|
395 |
|
/* valid user name check */ |
396 |
< |
if (valid_username(source_p->username) == 0) |
396 |
> |
if (!valid_username(source_p->username, 1)) |
397 |
|
{ |
398 |
|
char tmpstr2[IRCD_BUFSIZE]; |
399 |
|
|
424 |
|
get_client_class(&source_p->localClient->confs), |
425 |
|
source_p->info, source_p->id); |
426 |
|
|
427 |
– |
sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE, |
428 |
– |
"CLICONN %s %s %s %s %s %s %s 0 %s", |
429 |
– |
source_p->name, source_p->username, source_p->host, |
430 |
– |
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
431 |
– |
"255.255.255.255" : source_p->sockhost, |
432 |
– |
get_client_class(&source_p->localClient->confs), |
433 |
– |
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
434 |
– |
"<hidden>" : source_p->localClient->client_host, |
435 |
– |
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
436 |
– |
"<hidden>" : source_p->localClient->client_server, |
437 |
– |
source_p->info); |
438 |
– |
|
439 |
– |
|
427 |
|
if (ConfigFileEntry.invisible_on_connect) |
428 |
|
{ |
429 |
|
AddUMode(source_p, UMODE_INVISIBLE); |
430 |
|
++Count.invisi; |
431 |
|
} |
432 |
|
|
433 |
< |
if ((++Count.local) > Count.max_loc) |
433 |
> |
if (++Count.local > Count.max_loc) |
434 |
|
{ |
435 |
|
Count.max_loc = Count.local; |
436 |
|
|
541 |
|
add_user_host(source_p->username, source_p->host, 1); |
542 |
|
SetUserHost(source_p); |
543 |
|
|
544 |
+ |
if (HasFlag(source_p->servptr, FLAGS_EOB)) |
545 |
+ |
sendto_realops_flags(UMODE_FARCONNECT, L_ALL, SEND_NOTICE, |
546 |
+ |
"Client connecting at %s: %s (%s@%s) [%s] <%s>", |
547 |
+ |
source_p->servptr->name, |
548 |
+ |
source_p->name, source_p->username, source_p->host, |
549 |
+ |
source_p->info, source_p->id); |
550 |
+ |
|
551 |
|
introduce_client(source_p); |
552 |
|
} |
553 |
|
|
623 |
|
ubuf, source_p->username, source_p->host, |
624 |
|
source_p->servptr->name, source_p->info); |
625 |
|
} |
626 |
+ |
|
627 |
+ |
if (!EmptyString(source_p->certfp)) |
628 |
+ |
sendto_one(server, ":%s CERTFP %s", ID(source_p), source_p->certfp); |
629 |
|
} |
630 |
|
} |
631 |
|
|
667 |
|
* style of username |
668 |
|
*/ |
669 |
|
int |
670 |
< |
valid_username(const char *username) |
670 |
> |
valid_username(const char *username, const int local) |
671 |
|
{ |
672 |
|
int dots = 0; |
673 |
|
const char *p = username; |
677 |
|
if (*p == '~') |
678 |
|
++p; |
679 |
|
|
680 |
< |
/* reject usernames that don't start with an alphanum |
680 |
> |
/* |
681 |
> |
* Reject usernames that don't start with an alphanum |
682 |
|
* i.e. reject jokers who have '-@somehost' or '.@somehost' |
683 |
|
* or "-hi-@somehost", "h-----@somehost" would still be accepted. |
684 |
|
*/ |
685 |
|
if (!IsAlNum(*p)) |
686 |
|
return 0; |
687 |
|
|
688 |
< |
while (*++p) |
688 |
> |
if (local) |
689 |
|
{ |
690 |
< |
if ((*p == '.') && ConfigFileEntry.dots_in_ident) |
690 |
> |
while (*++p) |
691 |
|
{ |
692 |
< |
if (++dots > ConfigFileEntry.dots_in_ident) |
693 |
< |
return 0; |
694 |
< |
if (!IsUserChar(*(p + 1))) |
692 |
> |
if ((*p == '.') && ConfigFileEntry.dots_in_ident) |
693 |
> |
{ |
694 |
> |
if (++dots > ConfigFileEntry.dots_in_ident) |
695 |
> |
return 0; |
696 |
> |
if (!IsUserChar(*(p + 1))) |
697 |
> |
return 0; |
698 |
> |
} |
699 |
> |
else if (!IsUserChar(*p)) |
700 |
|
return 0; |
701 |
|
} |
702 |
< |
else if (!IsUserChar(*p)) |
703 |
< |
return 0; |
702 |
> |
} |
703 |
> |
else |
704 |
> |
{ |
705 |
> |
while (*++p) |
706 |
> |
if (!IsUserChar(*p)) |
707 |
> |
return 0; |
708 |
|
} |
709 |
|
|
710 |
< |
return 1; |
710 |
> |
return p - username <= USERLEN;; |
711 |
|
} |
712 |
|
|
713 |
|
/* clean_nick_name() |
748 |
|
{ |
749 |
|
/* If this user is being spoofed, tell them so */ |
750 |
|
if (IsConfDoSpoofIp(conf)) |
744 |
– |
{ |
751 |
|
sendto_one(source_p, |
752 |
< |
":%s NOTICE %s :*** Spoofing your IP. congrats.", |
752 |
> |
":%s NOTICE %s :*** Spoofing your IP. Congrats.", |
753 |
|
me.name, source_p->name); |
748 |
– |
} |
754 |
|
|
755 |
|
/* If this user is in the exception class, Set it "E lined" */ |
756 |
|
if (IsConfExemptKline(conf)) |
757 |
|
{ |
758 |
|
SetExemptKline(source_p); |
759 |
|
sendto_one(source_p, |
760 |
< |
":%s NOTICE %s :*** You are exempt from K/D/G lines. congrats.", |
760 |
> |
":%s NOTICE %s :*** You are exempt from K/D/G lines. Congrats.", |
761 |
|
me.name, source_p->name); |
762 |
|
} |
763 |
|
|
764 |
< |
/* The else here is to make sure that G line exempt users |
764 |
> |
/* |
765 |
> |
* The else here is to make sure that G line exempt users |
766 |
|
* do not get noticed twice. |
767 |
|
*/ |
768 |
|
else if (IsConfExemptGline(conf)) |
769 |
|
{ |
770 |
|
SetExemptGline(source_p); |
771 |
< |
sendto_one(source_p, ":%s NOTICE %s :*** You are exempt from G lines.", |
771 |
> |
sendto_one(source_p, ":%s NOTICE %s :*** You are exempt from G lines. Congrats.", |
772 |
|
me.name, source_p->name); |
773 |
|
} |
774 |
|
|
775 |
|
if (IsConfExemptResv(conf)) |
776 |
|
{ |
777 |
|
SetExemptResv(source_p); |
778 |
< |
sendto_one(source_p, ":%s NOTICE %s :*** You are exempt from resvs.", |
778 |
> |
sendto_one(source_p, ":%s NOTICE %s :*** You are exempt from resvs. Congrats.", |
779 |
|
me.name, source_p->name); |
780 |
|
} |
781 |
|
|
784 |
|
{ |
785 |
|
SetExemptLimits(source_p); |
786 |
|
sendto_one(source_p, |
787 |
< |
":%s NOTICE %s :*** You are exempt from user limits. congrats.", |
787 |
> |
":%s NOTICE %s :*** You are exempt from user limits. Congrats.", |
788 |
|
me.name,source_p->name); |
789 |
|
} |
790 |
|
|
797 |
|
} |
798 |
|
} |
799 |
|
|
794 |
– |
/* change_simple_umode() |
795 |
– |
* |
796 |
– |
* this callback can be hooked to allow special handling of |
797 |
– |
* certain usermodes |
798 |
– |
*/ |
799 |
– |
static void * |
800 |
– |
change_simple_umode(va_list args) |
801 |
– |
{ |
802 |
– |
struct Client *client_p; |
803 |
– |
struct Client *source_p; |
804 |
– |
int what; |
805 |
– |
unsigned int flag; |
806 |
– |
|
807 |
– |
client_p = va_arg(args, struct Client *); |
808 |
– |
source_p = va_arg(args, struct Client *); |
809 |
– |
what = va_arg(args, int); |
810 |
– |
flag = va_arg(args, unsigned int); |
811 |
– |
|
812 |
– |
if (what == MODE_ADD) |
813 |
– |
AddUMode(source_p, flag); |
814 |
– |
else |
815 |
– |
DelUMode(source_p, flag); |
816 |
– |
|
817 |
– |
return NULL; |
818 |
– |
} |
819 |
– |
|
800 |
|
/* set_user_mode() |
801 |
|
* |
802 |
|
* added 15/10/91 By Darren Reed. |
835 |
|
m = buf; |
836 |
|
*m++ = '+'; |
837 |
|
|
838 |
< |
for (i = 0; i < 128; i++) |
838 |
> |
for (i = 0; i < 128; ++i) |
839 |
|
if (HasUMode(source_p, user_modes[i])) |
840 |
|
*m++ = (char)i; |
841 |
|
*m = '\0'; |
845 |
|
return; |
846 |
|
} |
847 |
|
|
868 |
– |
execute_callback(entering_umode_cb, client_p, source_p); |
869 |
– |
|
848 |
|
/* find flags already set for user */ |
849 |
|
setflags = source_p->umodes; |
850 |
|
|
851 |
|
/* parse mode change string(s) */ |
852 |
< |
for (p = &parv[2]; p && *p; p++) |
852 |
> |
for (p = &parv[2]; p && *p; ++p) |
853 |
|
{ |
854 |
< |
for (m = *p; *m; m++) |
854 |
> |
for (m = *p; *m; ++m) |
855 |
|
{ |
856 |
|
switch (*m) |
857 |
|
{ |
883 |
|
|
884 |
|
if (MyConnect(source_p)) |
885 |
|
{ |
886 |
< |
dlink_node *dm; |
886 |
> |
dlink_node *dm = NULL; |
887 |
|
|
888 |
|
detach_conf(source_p, CONF_OPER); |
889 |
|
ClrOFlag(source_p); |
896 |
|
|
897 |
|
break; |
898 |
|
|
899 |
< |
/* we may not get these, |
900 |
< |
* but they shouldnt be in default |
901 |
< |
*/ |
924 |
< |
case 'r': |
925 |
< |
case ' ' : |
926 |
< |
case '\n': |
927 |
< |
case '\r': |
928 |
< |
case '\t': |
899 |
> |
case 'S': /* Only servers may set +S in a burst */ |
900 |
> |
case 'r': /* Only services may set +r */ |
901 |
> |
case 'x': /* Only services may set +x */ |
902 |
|
break; |
903 |
|
|
904 |
|
default: |
906 |
|
{ |
907 |
|
if (MyConnect(source_p) && !HasUMode(source_p, UMODE_OPER) && |
908 |
|
(ConfigFileEntry.oper_only_umodes & flag)) |
936 |
– |
{ |
909 |
|
badflag = 1; |
938 |
– |
} |
910 |
|
else |
911 |
< |
execute_callback(umode_cb, client_p, source_p, what, flag); |
912 |
< |
} |
913 |
< |
else |
914 |
< |
{ |
915 |
< |
if (MyConnect(source_p)) |
916 |
< |
badflag = 1; |
911 |
> |
{ |
912 |
> |
if (what == MODE_ADD) |
913 |
> |
AddUMode(source_p, flag); |
914 |
> |
else |
915 |
> |
DelUMode(source_p, flag); |
916 |
> |
} |
917 |
|
} |
918 |
+ |
else if (MyConnect(source_p)) |
919 |
+ |
badflag = 1; |
920 |
|
|
921 |
|
break; |
922 |
|
} |
927 |
|
sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), |
928 |
|
me.name, source_p->name); |
929 |
|
|
957 |
– |
if (HasUMode(source_p, UMODE_NCHANGE) && !HasOFlag(source_p, OPER_FLAG_N)) |
958 |
– |
{ |
959 |
– |
sendto_one(source_p, ":%s NOTICE %s :*** You have no nchange flag;", |
960 |
– |
me.name, source_p->name); |
961 |
– |
DelUMode(source_p, UMODE_NCHANGE); |
962 |
– |
} |
963 |
– |
|
930 |
|
if (MyConnect(source_p) && HasUMode(source_p, UMODE_ADMIN) && |
931 |
|
!HasOFlag(source_p, OPER_FLAG_ADMIN)) |
932 |
|
{ |
971 |
|
* build a string in umode_buf to represent the change in the user's |
972 |
|
* mode between the new (source_p->umodes) and 'old'. |
973 |
|
*/ |
974 |
< |
for (i = 0; i < 128; i++) |
974 |
> |
for (i = 0; i < 128; ++i) |
975 |
|
{ |
976 |
|
flag = user_modes[i]; |
977 |
|
if (!flag) |
1045 |
|
} |
1046 |
|
|
1047 |
|
void |
1048 |
< |
user_set_hostmask(struct Client *target_p, const char *hostname) |
1048 |
> |
user_set_hostmask(struct Client *target_p, const char *hostname, const int what) |
1049 |
|
{ |
1050 |
< |
if (!valid_hostname(hostname)) |
1050 |
> |
dlink_node *ptr = NULL; |
1051 |
> |
|
1052 |
> |
if (!strcmp(target_p->host, hostname)) |
1053 |
|
return; |
1054 |
|
|
1055 |
+ |
switch (what) |
1056 |
+ |
{ |
1057 |
+ |
case MODE_ADD: |
1058 |
+ |
AddUMode(target_p, UMODE_HIDDENHOST); |
1059 |
+ |
AddFlag(target_p, FLAGS_IP_SPOOFING); |
1060 |
+ |
break; |
1061 |
+ |
case MODE_DEL: |
1062 |
+ |
DelUMode(target_p, UMODE_HIDDENHOST); |
1063 |
+ |
|
1064 |
+ |
if (!HasFlag(target_p, FLAGS_AUTH_SPOOF)) |
1065 |
+ |
DelFlag(target_p, FLAGS_IP_SPOOFING); |
1066 |
+ |
break; |
1067 |
+ |
default: return; |
1068 |
+ |
} |
1069 |
+ |
|
1070 |
+ |
if (ConfigFileEntry.cycle_on_host_change) |
1071 |
+ |
sendto_common_channels_local(target_p, 0, 0, ":%s!%s@%s QUIT :Changing hostname", |
1072 |
+ |
target_p->name, target_p->username, target_p->host); |
1073 |
+ |
|
1074 |
|
if (IsUserHostIp(target_p)) |
1075 |
|
delete_user_host(target_p->username, target_p->host, !MyConnect(target_p)); |
1076 |
|
|
1077 |
|
strlcpy(target_p->host, hostname, sizeof(target_p->host)); |
1091 |
– |
SetIPSpoof(target_p); |
1078 |
|
|
1079 |
|
add_user_host(target_p->username, target_p->host, !MyConnect(target_p)); |
1080 |
|
SetUserHost(target_p); |
1081 |
|
|
1082 |
|
if (MyClient(target_p)) |
1083 |
+ |
{ |
1084 |
+ |
sendto_one(target_p, form_str(RPL_NEWHOSTIS), me.name, |
1085 |
+ |
target_p->name, target_p->host); |
1086 |
|
clear_ban_cache_client(target_p); |
1087 |
+ |
} |
1088 |
+ |
|
1089 |
+ |
if (!ConfigFileEntry.cycle_on_host_change) |
1090 |
+ |
return; |
1091 |
+ |
|
1092 |
+ |
DLINK_FOREACH(ptr, target_p->channel.head) |
1093 |
+ |
{ |
1094 |
+ |
char modebuf[4], nickbuf[NICKLEN * 3 + 3] = { '\0' }; |
1095 |
+ |
char *p = modebuf; |
1096 |
+ |
int len = 0; |
1097 |
+ |
const struct Membership *ms = ptr->data; |
1098 |
+ |
|
1099 |
+ |
if (has_member_flags(ms, CHFL_CHANOP)) |
1100 |
+ |
{ |
1101 |
+ |
*p++ = 'o'; |
1102 |
+ |
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
1103 |
+ |
} |
1104 |
+ |
|
1105 |
+ |
if (has_member_flags(ms, CHFL_HALFOP)) |
1106 |
+ |
{ |
1107 |
+ |
*p++ = 'h'; |
1108 |
+ |
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
1109 |
+ |
} |
1110 |
+ |
|
1111 |
+ |
if (has_member_flags(ms, CHFL_VOICE)) |
1112 |
+ |
{ |
1113 |
+ |
*p++ = 'v'; |
1114 |
+ |
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
1115 |
+ |
} |
1116 |
+ |
|
1117 |
+ |
*p = '\0'; |
1118 |
+ |
|
1119 |
+ |
sendto_channel_local_butone(target_p, 0, 0, ms->chptr, ":%s!%s@%s JOIN :%s", |
1120 |
+ |
target_p->name, target_p->username, target_p->host, |
1121 |
+ |
ms->chptr->chname); |
1122 |
+ |
if (nickbuf[0]) |
1123 |
+ |
sendto_channel_local_butone(target_p, 0, 0, ms->chptr, ":%s MODE %s +%s %s", |
1124 |
+ |
target_p->servptr->name, ms->chptr->chname, |
1125 |
+ |
modebuf, nickbuf); |
1126 |
+ |
|
1127 |
+ |
} |
1128 |
+ |
|
1129 |
+ |
if (target_p->away[0]) |
1130 |
+ |
sendto_common_channels_local(target_p, 0, CAP_AWAY_NOTIFY, |
1131 |
+ |
":%s!%s@%s AWAY :%s", |
1132 |
+ |
target_p->name, target_p->username, |
1133 |
+ |
target_p->host, target_p->away); |
1134 |
|
} |
1135 |
|
|
1136 |
|
/* user_welcome() |
1149 |
|
#endif |
1150 |
|
|
1151 |
|
#ifdef HAVE_LIBCRYPTO |
1152 |
< |
if (source_p->localClient->fd.ssl != NULL) |
1152 |
> |
if (HasFlag(source_p, FLAGS_SSL)) |
1153 |
> |
{ |
1154 |
> |
AddUMode(source_p, UMODE_SSL); |
1155 |
|
sendto_one(source_p, ":%s NOTICE %s :*** Connected securely via %s", |
1156 |
|
me.name, source_p->name, |
1157 |
|
ssl_get_cipher(source_p->localClient->fd.ssl)); |
1158 |
+ |
} |
1159 |
|
#endif |
1160 |
|
|
1161 |
|
sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name, |
1173 |
|
source_p->name, source_p->id); |
1174 |
|
|
1175 |
|
show_lusers(source_p); |
1176 |
< |
|
1138 |
< |
if (ConfigFileEntry.short_motd) |
1139 |
< |
{ |
1140 |
< |
sendto_one(source_p, ":%s NOTICE %s :*** Notice -- motd was last changed at %s", |
1141 |
< |
me.name, source_p->name, ConfigFileEntry.motd.lastChangedDate); |
1142 |
< |
sendto_one(source_p, |
1143 |
< |
":%s NOTICE %s :*** Notice -- Please read the motd if you haven't " |
1144 |
< |
"read it", me.name, source_p->name); |
1145 |
< |
sendto_one(source_p, form_str(RPL_MOTDSTART), |
1146 |
< |
me.name, source_p->name, me.name); |
1147 |
< |
sendto_one(source_p, form_str(RPL_MOTD), |
1148 |
< |
me.name, source_p->name, |
1149 |
< |
"*** This is the short motd ***"); |
1150 |
< |
sendto_one(source_p, form_str(RPL_ENDOFMOTD), |
1151 |
< |
me.name, source_p->name); |
1152 |
< |
} |
1153 |
< |
else |
1154 |
< |
send_message_file(source_p, &ConfigFileEntry.motd); |
1176 |
> |
motd_signon(source_p); |
1177 |
|
} |
1178 |
|
|
1179 |
|
/* check_xline() |
1188 |
|
struct MaskItem *conf = NULL; |
1189 |
|
const char *reason = NULL; |
1190 |
|
|
1191 |
< |
if ((conf = find_matching_name_conf(CONF_XLINE, source_p->info, NULL, NULL, 0)) || |
1170 |
< |
(conf = find_matching_name_conf(CONF_RXLINE, source_p->info, NULL, NULL, 0))) |
1191 |
> |
if ((conf = find_matching_name_conf(CONF_XLINE, source_p->info, NULL, NULL, 0))) |
1192 |
|
{ |
1193 |
|
++conf->count; |
1194 |
|
|
1247 |
|
|
1248 |
|
if (HasOFlag(source_p, OPER_FLAG_ADMIN)) |
1249 |
|
AddUMode(source_p, UMODE_ADMIN); |
1229 |
– |
if (!HasOFlag(source_p, OPER_FLAG_N)) |
1230 |
– |
DelUMode(source_p, UMODE_NCHANGE); |
1250 |
|
|
1251 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s is now an operator", |
1252 |
|
get_oper_name(source_p)); |
1291 |
|
new_uid[i] = 'A'; |
1292 |
|
|
1293 |
|
/* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */ |
1275 |
– |
/* Yes nenolod, I have known it was off by one ever since I wrote it |
1276 |
– |
* But *JUST* for you, though, it really doesn't look as *pretty* |
1277 |
– |
* -Dianora |
1278 |
– |
*/ |
1294 |
|
memcpy(new_uid + IRC_MAXSID, "AAAAA@", IRC_MAXUID); |
1280 |
– |
|
1281 |
– |
entering_umode_cb = register_callback("entering_umode", NULL); |
1282 |
– |
umode_cb = register_callback("changing_umode", change_simple_umode); |
1295 |
|
} |
1296 |
|
|
1297 |
|
/* |
1351 |
|
void |
1352 |
|
init_isupport(void) |
1353 |
|
{ |
1342 |
– |
isupportFile = init_MessageLine(); |
1343 |
– |
|
1354 |
|
add_isupport("CALLERID", NULL, -1); |
1355 |
|
add_isupport("CASEMAPPING", CASEMAP, -1); |
1356 |
|
add_isupport("DEAF", "D", -1); |
1363 |
|
add_isupport("PREFIX", "(ov)@+", -1); |
1364 |
|
add_isupport("STATUSMSG", "@+", -1); |
1365 |
|
#endif |
1366 |
+ |
add_isupport("EXCEPTS", "e", -1); |
1367 |
+ |
add_isupport("INVEX", "I", -1); |
1368 |
|
} |
1369 |
|
|
1370 |
|
/* |
1448 |
|
{ |
1449 |
|
char isupportbuffer[IRCD_BUFSIZE]; |
1450 |
|
char *p = isupportbuffer; |
1451 |
< |
dlink_node *ptr = NULL; |
1451 |
> |
dlink_node *ptr = NULL, *ptr_next = NULL; |
1452 |
|
int n = 0; |
1453 |
|
int tokens = 0; |
1454 |
|
size_t len = 0; |
1455 |
|
size_t reserve = strlen(me.name) + HOSTLEN + strlen(form_str(RPL_ISUPPORT)); |
1456 |
|
|
1457 |
< |
destroy_MessageLine(isupportFile); |
1457 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, support_list_lines.head) |
1458 |
> |
{ |
1459 |
> |
dlinkDelete(ptr, &support_list_lines); |
1460 |
> |
MyFree(ptr->data); |
1461 |
> |
free_dlink_node(ptr); |
1462 |
> |
} |
1463 |
|
|
1464 |
|
DLINK_FOREACH(ptr, support_list.head) |
1465 |
|
{ |
1489 |
|
if (*--p == ' ') |
1490 |
|
*p = '\0'; |
1491 |
|
|
1492 |
< |
addto_MessageLine(isupportFile, isupportbuffer); |
1492 |
> |
dlinkAddTail(xstrdup(isupportbuffer), make_dlink_node(), &support_list_lines); |
1493 |
|
p = isupportbuffer; |
1494 |
|
len = 0; |
1495 |
|
n = tokens = 0; |
1500 |
|
{ |
1501 |
|
if (*--p == ' ') |
1502 |
|
*p = '\0'; |
1503 |
< |
addto_MessageLine(isupportFile, isupportbuffer); |
1503 |
> |
dlinkAddTail(xstrdup(isupportbuffer), make_dlink_node(), &support_list_lines); |
1504 |
|
} |
1505 |
|
} |