From a2e4eeb6669b6b35954d3fbdaf6c814c719345b4 Mon Sep 17 00:00:00 2001 From: "trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Wed, 6 Oct 2004 03:31:37 +0000 Subject: BUILD : 1.7.5 (371) BUGS : 175? NOTES : Fixed some ircd protcol mistakes, clean up clear modes, also a patch form DrStein git-svn-id: svn://svn.anope.org/anope/trunk@371 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@241 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 8 + Changes.lang | 12 + lang/cat.l | 28 + lang/de.l | 28 + lang/en_us.l | 28 + lang/es.l | 28 + lang/fr.l | 28 + lang/gr.l | 28 + lang/hun.l | 28 + lang/it.l | 28 + lang/nl.l | 28 + lang/pl.l | 28 + lang/pt.l | 28 + lang/ru.l | 28 + lang/tr.l | 28 + src/bahamut.c | 6 +- src/chanserv.c | 47 +- src/dreamforge.c | 4 +- src/hybrid.c | 1831 ++++++++++++++++++++++++++---------------------------- src/nickserv.c | 40 +- src/operserv.c | 63 +- src/ptlink.c | 6 +- src/rageircd.c | 6 +- src/ultimate2.c | 16 +- src/ultimate3.c | 10 +- src/unreal31.c | 4 +- src/unreal32.c | 21 +- src/users.c | 2 +- src/viagra.c | 4 +- version.log | 6 +- 30 files changed, 1411 insertions(+), 1039 deletions(-) diff --git a/Changes b/Changes index c919345eb..89b695562 100644 --- a/Changes +++ b/Changes @@ -18,6 +18,8 @@ Provided by Anope Dev. - 2004 08/24 F Compile error with gcc2. [ #00] Provided by Trystan - 2004 +10/05 F Cleaned up how OS/CS CLEAR MODES works [ #00] +10/05 A Globalized CS/NS STATUS messages [ #00] 10/02 A Added NewsCount as new feature in services.conf [ #00] 08/28 A CSupport for +I channel mode. [ #00] 08/28 A Complete support for Unreal3.2 [ #00] @@ -26,6 +28,7 @@ Provided by Trystan - 2004 09/07 A Ircd CHANMODE now trapped and stored. [ #00] 08/23 A New protocol independent design (aka anope-capab). [ #00] 08/28 A New IRCD document for adding new ircd support to new design. [ #00] +10/05 F Cleaned up how OS/CS CLEAR MODES works [ #00] 09/27 F Verbose message for vident. [#173] 09/27 F Check and trap for forbidden nicks on HS. [#172] 09/27 F Tracking of IP address for simple checks. [#166] @@ -44,6 +47,11 @@ Provided by Trystan - 2004 08/28 F Memory leaks taken care of. [#157] 08/28 F Buffer preparation for vsnprintf() call. [#158] +Provided by DrStein - 2004 +10/05 A NS INFO shows the expire time [ #00] +10/05 A NS GLIST shows the expire time [ #00] +10/05 F NS GLIST allows the owner of the nick to use the nickname param [ #00] + Anope Version 1.7.5 ------------------- diff --git a/Changes.lang b/Changes.lang index f26ec5c87..c907a4348 100644 --- a/Changes.lang +++ b/Changes.lang @@ -10,6 +10,18 @@ Anope Version S V N OPER_UMODE_UNSUPPORTED CHAN_CLEARED_INVITES NICK_INFO_VHOST2 + NICK_STATUS_0 + NICK_STATUS_1 + NICK_STATUS_2 + NICK_STATUS_3 + CHAN_STATUS_SYNTAX + CHAN_STATUS_NOT_REGGED + CHAN_STATUS_FORBIDDEN + CHAN_STATUS_NOTONLINE + CHAN_STATUS_INFO + NICK_INFO_EXPIRE + NICK_GLIST_REPLY + NICK_GLIST_REPLY_ADMIN *** Mod Strings: diff --git a/lang/cat.l b/lang/cat.l index 5795b255b..6777acc8b 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -551,6 +551,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Lllista d'accés per %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -588,6 +598,8 @@ NICK_INFO_GREET Missatge de benvinguda: %s NICK_INFO_OPTIONS Opciós: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Protecció @@ -637,6 +649,10 @@ NICK_GLIST_HEADER_X Lllista de nicknames en el grup de %s: NICK_GLIST_FOOTER %d nicknames en el grup. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1329,6 +1345,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Nivells d'accés per a %s canviats als valors originals. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO canal [ALL] diff --git a/lang/de.l b/lang/de.l index d67c1febe..7cbb7678e 100644 --- a/lang/de.l +++ b/lang/de.l @@ -562,6 +562,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Access-List von %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -599,6 +609,8 @@ NICK_INFO_GREET Grussnachricht: %s NICK_INFO_OPTIONS Optionen: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Kill-Schutz @@ -648,6 +660,10 @@ NICK_GLIST_HEADER_X Liste der Nicknamen in der Gruppe von %s: NICK_GLIST_FOOTER %d Nicks in der Gruppe. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1325,6 +1341,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Zugriffslevel für %s wurden auf Standardwerte zurückgesetzt. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO channel [ALL] diff --git a/lang/en_us.l b/lang/en_us.l index 3faee6c35..01a36c14a 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -541,6 +541,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Access list for %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -578,6 +588,8 @@ NICK_INFO_GREET Greet message: %s NICK_INFO_OPTIONS Options: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Protection @@ -627,6 +639,10 @@ NICK_GLIST_HEADER_X List of nicknames in the group of %s: NICK_GLIST_FOOTER %d nicknames in the group. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1306,6 +1322,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Access levels for %s reset to defaults. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO channel [ALL] diff --git a/lang/es.l b/lang/es.l index b4ea451b9..070ac9e6b 100644 --- a/lang/es.l +++ b/lang/es.l @@ -555,6 +555,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Lista de acceso para %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -592,6 +602,8 @@ NICK_INFO_GREET Mensaje de bienvenida: %s NICK_INFO_OPTIONS Opciones: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Proteccion @@ -641,6 +653,10 @@ NICK_GLIST_HEADER_X Lista de nicknames en el grupo de %s: NICK_GLIST_FOOTER %d nicknames en el grupo. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1327,6 +1343,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Niveles de acceso para %s resetados a los valores originales. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO canal [ALL] diff --git a/lang/fr.l b/lang/fr.l index 27b5d45ff..942e05751 100644 --- a/lang/fr.l +++ b/lang/fr.l @@ -553,6 +553,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Liste d'accès de %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -590,6 +600,8 @@ NICK_INFO_GREET Message d'accueil: %s NICK_INFO_OPTIONS Options: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Protection @@ -639,6 +651,10 @@ NICK_GLIST_HEADER_X Liste des nicks dans le groupe de %s: NICK_GLIST_FOOTER %d nicks dans le groupe. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1328,6 +1344,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Les levels d'accès de %s ont été réinitialisés à leur valeur par défaut. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO channel [ALL] diff --git a/lang/gr.l b/lang/gr.l index 9beabb950..71a5d049f 100644 --- a/lang/gr.l +++ b/lang/gr.l @@ -549,6 +549,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Ëßóôá ðñüóâáóçò ãéá %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -586,6 +596,8 @@ NICK_INFO_GREET ÌÞíõìá ÷áéñåôéóìïý: %s NICK_INFO_OPTIONS ÅðéëïãÝò: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Ðñïóôáóßá @@ -635,6 +647,10 @@ NICK_GLIST_HEADER_X Ç ëßóôá ìå ôá øåõäþíõìá óôçí ïìÜäá ôïõ %s: NICK_GLIST_FOOTER %d øåõäþíõìá ìÝóá óôçí ïìÜäá. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1318,6 +1334,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Ï âáèìüò Access ãéá ôï %s óâÞóôçêå óôï áñ÷éêü. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO channel [ALL] diff --git a/lang/hun.l b/lang/hun.l index e6f0667ed..b7375d732 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -548,6 +548,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X %s hozzáférési listája: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO Válaszok NICK_INFO_SYNTAX INFO nick [ALL] @@ -585,6 +595,8 @@ NICK_INFO_GREET Köszöntõ üzenet: %s NICK_INFO_OPTIONS Opciók: %s +NICK_INFO_EXPIRE + Expires in: %s # Ezek a stringek NEM LEHETNEK üresek NICK_INFO_OPT_KILL Kill védelem @@ -634,6 +646,10 @@ NICK_GLIST_HEADER_X %s csoportjába tartozó nickek listája: NICK_GLIST_FOOTER %d nicknév van a csoportban. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER válaszok NICK_RECOVER_SYNTAX @@ -1316,6 +1332,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET %s szintjei visszaállítva az alapértékekre. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO válaszok CHAN_INFO_SYNTAX INFO #szoba [ALL] diff --git a/lang/it.l b/lang/it.l index 0bc0eff80..d1a47a04a 100644 --- a/lang/it.l +++ b/lang/it.l @@ -550,6 +550,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Lista di accesso di %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -587,6 +597,8 @@ NICK_INFO_GREET Messaggio di saluto (greet): %s NICK_INFO_OPTIONS Opzioni: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Protezione @@ -636,6 +648,10 @@ NICK_GLIST_HEADER_X Lista dei nick nel gruppo di %s: NICK_GLIST_FOOTER %d nick nel gruppo. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1319,6 +1335,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET I livelli di accesso di %s sono stati ripristinati ai valori originali. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO canale [ALL] diff --git a/lang/nl.l b/lang/nl.l index 8c5246760..4db06622b 100644 --- a/lang/nl.l +++ b/lang/nl.l @@ -552,6 +552,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Toegangslijst voor %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -589,6 +599,8 @@ NICK_INFO_GREET Groet-bericht: %s NICK_INFO_OPTIONS Opties: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Bescherming @@ -638,6 +650,10 @@ NICK_GLIST_HEADER_X Lijst van nicks in de groep van %s: NICK_GLIST_FOOTER %d nicks in de groep. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1316,6 +1332,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Toegangsniveaus voor %s teruggezet naar standaardwaarden. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO kanaal [ALL] diff --git a/lang/pl.l b/lang/pl.l index 7d2bdbdc3..cf93afcef 100644 --- a/lang/pl.l +++ b/lang/pl.l @@ -602,6 +602,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Lista dostêpu dla %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -639,6 +649,8 @@ NICK_INFO_GREET Wiadomo¶æ powitalna: %s NICK_INFO_OPTIONS Opcje: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Chroniony @@ -689,6 +701,10 @@ NICK_GLIST_HEADER_X Lista cz³onków grupy %s: NICK_GLIST_FOOTER %d cz³onków w grupie. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1432,6 +1448,18 @@ CHAN_LEVELS_RESET Poziomy dostêpu na %s zosta³y zresetowane do domy¶lnych. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO kana³ [ALL] diff --git a/lang/pt.l b/lang/pt.l index fe90234f8..0b7433fbd 100644 --- a/lang/pt.l +++ b/lang/pt.l @@ -549,6 +549,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Lista de acesso para %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -586,6 +596,8 @@ NICK_INFO_GREET Mensagem de entrada: %s NICK_INFO_OPTIONS Opções: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Proteção @@ -635,6 +647,10 @@ NICK_GLIST_HEADER_X Lista de nicks no grupo %s: NICK_GLIST_FOOTER %d nicks no grupo. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1320,6 +1336,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Níveis de acesso para o %s redefinidos para o padrão. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO canal [ALL] diff --git a/lang/ru.l b/lang/ru.l index a66d59570..4de546c39 100644 --- a/lang/ru.l +++ b/lang/ru.l @@ -549,6 +549,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X Ñïèñîê äîñòóïà äëÿ %s: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -586,6 +596,8 @@ NICK_INFO_GREET Ñîîáùåíèå ïðèâåòñòâèÿ: %s NICK_INFO_OPTIONS Ïàðàìåòðû: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Çàùèòà @@ -635,6 +647,10 @@ NICK_GLIST_HEADER_X Ñïèñîê íèêîâ â ãðóïïå %s: NICK_GLIST_FOOTER %d íèêîâ â ãðóïïå. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1314,6 +1330,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET Óðîâíè äîñòóïà äëÿ êàíàëà %s ñáðîøåíû íà çíà÷åíèÿ ïî óìîë÷àíèþ. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO #êàíàë [ALL] diff --git a/lang/tr.l b/lang/tr.l index 433fcb673..3442dca75 100644 --- a/lang/tr.l +++ b/lang/tr.l @@ -555,6 +555,16 @@ NICK_ACCESS_LIST NICK_ACCESS_LIST_X %s nickinin access listesi: +# Status messages +NICK_STATUS_0 + STATUS %s 0 +NICK_STATUS_1 + STATUS %s 1 +NICK_STATUS_2 + STATUS %s 2 +NICK_STATUS_3 + STATUS %s 3 + # INFO responses NICK_INFO_SYNTAX INFO nick [ALL] @@ -592,6 +602,8 @@ NICK_INFO_GREET Karþýlama mesajý: %s NICK_INFO_OPTIONS Özellikler: %s +NICK_INFO_EXPIRE + Expires in: %s # These strings MUST NOT be empty NICK_INFO_OPT_KILL Kill korumasý @@ -641,6 +653,10 @@ NICK_GLIST_HEADER_X %s grubundaki nicklerin listesi: NICK_GLIST_FOOTER Grupta %d nick var. +NICK_GLIST_REPLY + %c%s +NICK_GLIST_REPLY_ADMIN + %c%s (expires in %s) # RECOVER responses NICK_RECOVER_SYNTAX @@ -1324,6 +1340,18 @@ CHAN_LEVELS_LIST_NORMAL CHAN_LEVELS_RESET %s için access levelleri varsayýlanlarla deðiþtirildi. +# Status Messages +CHAN_STATUS_SYNTAX + STATUS ERROR Syntax error +CHAN_STATUS_NOT_REGGED + STATUS ERROR Channel %s not registered +CHAN_STATUS_FORBIDDEN + STATUS ERROR Channel %s forbidden +CHAN_STATUS_NOTONLINE + STATUS ERROR Nick %s not online +CHAN_STATUS_INFO + STATUS %s %s %d + # INFO responses CHAN_INFO_SYNTAX INFO kanaladý [ALL] diff --git a/src/bahamut.c b/src/bahamut.c index c8adb33f1..032268aae 100644 --- a/src/bahamut.c +++ b/src/bahamut.c @@ -75,8 +75,8 @@ IRCDVar ircd[] = { 1, /* svshold */ 1, /* time stamp on mode */ 1, /* NICKIP */ - 0, /* UMODE */ 0, /* O:LINE */ + 1, /* UMODE */ 0, /* VHOST ON NICK */ 0, /* Change RealName */ 0, /* ChanServ extra */ @@ -161,7 +161,7 @@ void anope_set_umode(User * user, int ac, char **av) break; case 'a': if (add && !is_services_admin(user)) { - send_cmd(ServerName, "SVSMODE %s -a", user->nick); + common_svsmode(user, "-a", NULL); user->mode &= ~UMODE_a; } break; @@ -192,7 +192,7 @@ void anope_set_umode(User * user, int ac, char **av) break; case 'r': if (add && !nick_identified(user)) { - send_cmd(ServerName, "SVSMODE %s -r", user->nick); + common_svsmode(user, "-r", NULL); user->mode &= ~UMODE_r; } break; diff --git a/src/chanserv.c b/src/chanserv.c index 0be9cb809..731e5262c 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -5726,16 +5726,40 @@ static int do_clear(User * u) char *argv[2]; if (c->mode) { - /* Clear modes */ + /* Clear modes the bulk of the modes */ anope_cmd_mode(s_ChanServ, c->name, "%s %s", - ircd->modestoremove, c->key ? c->key : ""); + ircd->modestoremove); argv[0] = sstrdup(ircd->modestoremove); - argv[1] = c->key ? c->key : NULL; - chan_set_modes(s_OperServ, c, c->key ? 2 : 1, argv, 0); + chan_set_modes(s_ChanServ, c, 1, argv, 0); free(argv[0]); - check_modes(c); + + /* to prevent the internals from complaining send -k, -L, -f by themselves if we need + to send them - TSL */ + if (c->key) { + anope_cmd_mode(s_ChanServ, c->name, "-k %s", c->key); + argv[0] = sstrdup("-k"); + argv[1] = c->key; + chan_set_modes(s_ChanServ, c, 2, argv, 0); + free(argv[0]); + } + if (ircd->Lmode && c->redirect) { + anope_cmd_mode(s_ChanServ, c->name, "-L %s", c->redirect); + argv[0] = sstrdup("-L"); + argv[1] = c->redirect; + chan_set_modes(s_ChanServ, c, 2, argv, 0); + free(argv[0]); + } + if (ircd->fmode && c->flood) { + anope_cmd_mode(s_ChanServ, c->name, "-f %s", c->flood); + argv[0] = sstrdup("-f"); + argv[1] = c->flood; + chan_set_modes(s_ChanServ, c, 2, argv, 0); + free(argv[0]); + } } + + /* TODO: decide if the above implementation is better than this one. */ if (0) { @@ -6152,7 +6176,7 @@ static int do_status(User * u) chan = strtok(NULL, " "); nick = strtok(NULL, " "); if (!nick || strtok(NULL, " ")) { - notice_user(s_ChanServ, u, "STATUS ERROR Syntax error"); + notice_lang(s_ChanServ, u, CHAN_STATUS_SYNTAX); return MOD_CONT; } if (!(ci = cs_findchan(chan))) { @@ -6162,18 +6186,15 @@ static int do_status(User * u) ci = cs_findchan(chan); } if (!ci) { - notice_user(s_ChanServ, u, - "STATUS ERROR Channel %s not registered", chan); + notice_lang(s_ChanServ, u, CHAN_STATUS_NOT_REGGED, chan); } else if (ci->flags & CI_VERBOTEN) { - notice_user(s_ChanServ, u, "STATUS ERROR Channel %s forbidden", - chan); + notice_lang(s_ChanServ, u, CHAN_STATUS_FORBIDDEN, chan); return MOD_CONT; } else if ((u2 = finduser(nick)) != NULL) { - notice_user(s_ChanServ, u, "STATUS %s %s %d", chan, nick, + notice_lang(s_ChanServ, u, CHAN_STATUS_INFO, chan, nick, get_access(u2, ci)); } else { /* !u2 */ - notice_user(s_ChanServ, u, "STATUS ERROR Nick %s not online", - nick); + notice_lang(s_ChanServ, u, CHAN_STATUS_NOTONLINE, nick); } return MOD_CONT; } diff --git a/src/dreamforge.c b/src/dreamforge.c index 6cd83bd3f..91c23239b 100644 --- a/src/dreamforge.c +++ b/src/dreamforge.c @@ -73,8 +73,8 @@ IRCDVar ircd[] = { 0, /* svshold */ 1, /* time stamp on mode */ 0, /* NICKIP */ - 0, /* UMODE */ 0, /* O:LINE */ + 1, /* UMODE */ 0, /* VHOST ON NICK */ 0, /* Change RealName */ 0, /* ChanServ extra */ @@ -183,7 +183,7 @@ void anope_set_umode(User * user, int ac, char **av) break; case 'r': if (add && !nick_identified(user)) { - send_cmd(ServerName, "SVSMODE %s -r", user->nick); + common_svsmode(user, "-r", NULL); user->mode &= ~UMODE_r; } break; diff --git a/src/hybrid.c b/src/hybrid.c index 7947173e2..9c2deafe2 100644 --- a/src/hybrid.c +++ b/src/hybrid.c @@ -73,8 +73,8 @@ IRCDVar ircd[] = { 0, /* svshold */ 0, /* time stamp on mode */ 0, /* NICKIP */ - 0, /* UMODE */ 0, /* O:LINE */ + 0, /* UMODE */ 0, /* VHOST ON NICK */ 0, /* Change RealName */ 0, /* ChanServ extra */ @@ -183,409 +183,391 @@ void anope_set_umode(User * user, int ac, char **av) opcnt--; } break; - case 'r': - if (add && !nick_identified(user)) { - send_cmd(ServerName, "SVSMODE %s -r", user->nick); - user->mode &= ~UMODE_r; - } - break; - } } -} - -unsigned long umodes[128] = { - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused, Unused, Horzontal Tab */ - 0, 0, 0, /* Line Feed, Unused, Unused */ - 0, 0, 0, /* Carriage Return, Unused, Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused, Unused, Space */ - 0, 0, 0, /* ! " # */ - 0, 0, 0, /* $ % & */ - 0, 0, 0, /* ! ( ) */ - 0, 0, 0, /* * + , */ - 0, 0, 0, /* - . / */ - 0, 0, /* 0 1 */ - 0, 0, /* 2 3 */ - 0, 0, /* 4 5 */ - 0, 0, /* 6 7 */ - 0, 0, /* 8 9 */ - 0, 0, /* : ; */ - 0, 0, 0, /* < = > */ - 0, 0, /* ? @ */ - 0, 0, 0, /* A B C */ - 0, 0, 0, /* D E F */ - 0, 0, 0, /* G H I */ - 0, 0, 0, /* J K L */ - 0, 0, 0, /* M N O */ - 0, 0, 0, /* P Q R */ - 0, 0, 0, /* S T U */ - 0, 0, 0, /* V W X */ - 0, /* Y */ - 0, /* Z */ - 0, 0, 0, /* [ \ ] */ - 0, 0, 0, /* ^ _ ` */ - UMODE_a, UMODE_b, UMODE_c, /* a b c */ - UMODE_d, 0, UMODE_f, /* d e f */ - UMODE_g, 0, UMODE_i, /* g h i */ - 0, UMODE_k, UMODE_l, /* j k l */ - 0, UMODE_n, UMODE_o, /* m n o */ - 0, 0, UMODE_r, /* p q r */ - UMODE_s, 0, UMODE_u, /* s t u */ - 0, UMODE_w, UMODE_x, /* v w x */ - UMODE_y, /* y */ - UMODE_z, /* z */ - 0, 0, 0, /* { | } */ - 0, 0 /* ~ ‚ */ -}; - - -char csmodes[128] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, - 'a', /* (33) ! */ - 0, 0, 0, - 'h', - 0, 0, 0, 0, - 0, - - 'v', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -CMMode cmmodes[128] = { - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, /* BCD */ - {NULL}, {NULL}, {NULL}, /* EFG */ - {NULL}, /* H */ - {add_invite, del_invite}, - {NULL}, /* J */ - {NULL}, {NULL}, {NULL}, /* KLM */ - {NULL}, {NULL}, {NULL}, /* NOP */ - {NULL}, {NULL}, {NULL}, /* QRS */ - {NULL}, {NULL}, {NULL}, /* TUV */ - {NULL}, {NULL}, {NULL}, /* WXY */ - {NULL}, /* Z */ - {NULL}, {NULL}, /* (char 91 - 92) */ - {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */ - {NULL}, /* ` (char 96) */ - {NULL}, /* a (char 97) */ - {add_ban, del_ban}, - {NULL}, - {NULL}, - {add_exception, del_exception}, - {NULL}, - {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL} -}; - - -CBMode cbmodes[128] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, - {0}, /* A */ - {0}, /* B */ - {0}, /* C */ - {0}, /* D */ - {0}, /* E */ - {0}, /* F */ - {0}, /* G */ - {0}, /* H */ - {0}, /* I */ - {0}, /* J */ - {0}, /* K */ - {0}, /* L */ - {0}, /* M */ - {0}, /* N */ - {0}, /* O */ - {0}, /* P */ - {0}, /* Q */ - {0}, - {0}, /* S */ - {0}, /* T */ - {0}, /* U */ - {0}, /* V */ - {0}, /* W */ - {0}, /* X */ - {0}, /* Y */ - {0}, /* Z */ - {0}, {0}, {0}, {0}, {0}, {0}, - {CMODE_a, 0, NULL, NULL}, - {0}, /* b */ - {0}, /* c */ - {0}, /* d */ - {0}, /* e */ - {0}, /* f */ - {0}, /* g */ - {0}, /* h */ - {CMODE_i, 0, NULL, NULL}, - {0}, /* j */ - {CMODE_k, 0, set_key, cs_set_key}, - {CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit}, - {CMODE_m, 0, NULL, NULL}, - {CMODE_n, 0, NULL, NULL}, - {0}, /* o */ - {CMODE_p, 0, NULL, NULL}, - {0}, /* q */ - {0}, - {CMODE_s, 0, NULL, NULL}, - {CMODE_t, 0, NULL, NULL}, - {0}, - {0}, /* v */ - {0}, /* w */ - {0}, /* x */ - {0}, /* y */ - {0}, /* z */ - {0}, {0}, {0}, {0} -}; - -CBModeInfo cbmodeinfos[] = { - {'a', CMODE_a, 0, NULL, NULL}, - {'i', CMODE_i, 0, NULL, NULL}, - {'k', CMODE_k, 0, get_key, cs_get_key}, - {'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit}, - {'m', CMODE_m, 0, NULL, NULL}, - {'n', CMODE_n, 0, NULL, NULL}, - {'p', CMODE_p, 0, NULL, NULL}, - {'s', CMODE_s, 0, NULL, NULL}, - {'t', CMODE_t, 0, NULL, NULL}, - {0} -}; + unsigned long umodes[128] = { + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused, Unused, Horzontal Tab */ + 0, 0, 0, /* Line Feed, Unused, Unused */ + 0, 0, 0, /* Carriage Return, Unused, Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused, Unused, Space */ + 0, 0, 0, /* ! " # */ + 0, 0, 0, /* $ % & */ + 0, 0, 0, /* ! ( ) */ + 0, 0, 0, /* * + , */ + 0, 0, 0, /* - . / */ + 0, 0, /* 0 1 */ + 0, 0, /* 2 3 */ + 0, 0, /* 4 5 */ + 0, 0, /* 6 7 */ + 0, 0, /* 8 9 */ + 0, 0, /* : ; */ + 0, 0, 0, /* < = > */ + 0, 0, /* ? @ */ + 0, 0, 0, /* A B C */ + 0, 0, 0, /* D E F */ + 0, 0, 0, /* G H I */ + 0, 0, 0, /* J K L */ + 0, 0, 0, /* M N O */ + 0, 0, 0, /* P Q R */ + 0, 0, 0, /* S T U */ + 0, 0, 0, /* V W X */ + 0, /* Y */ + 0, /* Z */ + 0, 0, 0, /* [ \ ] */ + 0, 0, 0, /* ^ _ ` */ + UMODE_a, UMODE_b, UMODE_c, /* a b c */ + UMODE_d, 0, UMODE_f, /* d e f */ + UMODE_g, 0, UMODE_i, /* g h i */ + 0, UMODE_k, UMODE_l, /* j k l */ + 0, UMODE_n, UMODE_o, /* m n o */ + 0, 0, UMODE_r, /* p q r */ + UMODE_s, 0, UMODE_u, /* s t u */ + 0, UMODE_w, UMODE_x, /* v w x */ + UMODE_y, /* y */ + UMODE_z, /* z */ + 0, 0, 0, /* { | } */ + 0, 0 /* ~ ‚ */ + }; + + + char csmodes[128] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, + 'a', /* (33) ! */ + 0, 0, 0, + 'h', + 0, 0, 0, 0, + 0, + + 'v', 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + CMMode cmmodes[128] = { + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, /* BCD */ + {NULL}, {NULL}, {NULL}, /* EFG */ + {NULL}, /* H */ + {add_invite, del_invite}, + {NULL}, /* J */ + {NULL}, {NULL}, {NULL}, /* KLM */ + {NULL}, {NULL}, {NULL}, /* NOP */ + {NULL}, {NULL}, {NULL}, /* QRS */ + {NULL}, {NULL}, {NULL}, /* TUV */ + {NULL}, {NULL}, {NULL}, /* WXY */ + {NULL}, /* Z */ + {NULL}, {NULL}, /* (char 91 - 92) */ + {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */ + {NULL}, /* ` (char 96) */ + {NULL}, /* a (char 97) */ + {add_ban, del_ban}, + {NULL}, + {NULL}, + {add_exception, del_exception}, + {NULL}, + {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL} + }; + + + CBMode cbmodes[128] = { + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, + {0}, /* A */ + {0}, /* B */ + {0}, /* C */ + {0}, /* D */ + {0}, /* E */ + {0}, /* F */ + {0}, /* G */ + {0}, /* H */ + {0}, /* I */ + {0}, /* J */ + {0}, /* K */ + {0}, /* L */ + {0}, /* M */ + {0}, /* N */ + {0}, /* O */ + {0}, /* P */ + {0}, /* Q */ + {0}, + {0}, /* S */ + {0}, /* T */ + {0}, /* U */ + {0}, /* V */ + {0}, /* W */ + {0}, /* X */ + {0}, /* Y */ + {0}, /* Z */ + {0}, {0}, {0}, {0}, {0}, {0}, + {CMODE_a, 0, NULL, NULL}, + {0}, /* b */ + {0}, /* c */ + {0}, /* d */ + {0}, /* e */ + {0}, /* f */ + {0}, /* g */ + {0}, /* h */ + {CMODE_i, 0, NULL, NULL}, + {0}, /* j */ + {CMODE_k, 0, set_key, cs_set_key}, + {CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit}, + {CMODE_m, 0, NULL, NULL}, + {CMODE_n, 0, NULL, NULL}, + {0}, /* o */ + {CMODE_p, 0, NULL, NULL}, + {0}, /* q */ + {0}, + {CMODE_s, 0, NULL, NULL}, + {CMODE_t, 0, NULL, NULL}, + {0}, + {0}, /* v */ + {0}, /* w */ + {0}, /* x */ + {0}, /* y */ + {0}, /* z */ + {0}, {0}, {0}, {0} + }; + + CBModeInfo cbmodeinfos[] = { + {'a', CMODE_a, 0, NULL, NULL}, + {'i', CMODE_i, 0, NULL, NULL}, + {'k', CMODE_k, 0, get_key, cs_get_key}, + {'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit}, + {'m', CMODE_m, 0, NULL, NULL}, + {'n', CMODE_n, 0, NULL, NULL}, + {'p', CMODE_p, 0, NULL, NULL}, + {'s', CMODE_s, 0, NULL, NULL}, + {'t', CMODE_t, 0, NULL, NULL}, + {0} + }; + + + CUMode cumodes[128] = { + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, + + {0}, /* a */ + {0}, /* b */ + {0}, /* c */ + {0}, /* d */ + {0}, /* e */ + {0}, /* f */ + {0}, /* g */ + {CUS_HALFOP, 0, check_valid_op}, + {0}, /* i */ + {0}, /* j */ + {0}, /* k */ + {0}, /* l */ + {0}, /* m */ + {0}, /* n */ + {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op}, + {0}, /* p */ + {0}, /* q */ + {0}, /* r */ + {0}, /* s */ + {0}, /* t */ + {0}, /* u */ + {CUS_VOICE, 0, NULL}, + {0}, /* w */ + {0}, /* x */ + {0}, /* y */ + {0}, /* z */ + {0}, {0}, {0}, {0}, {0} + }; + + + + void anope_cmd_notice(char *source, char *dest, const char *fmt, ...) { + va_list args; + char buf[BUFSIZE]; + *buf = '\0'; + + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + if (!buf) { + return; + } -CUMode cumodes[128] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, - - {0}, /* a */ - {0}, /* b */ - {0}, /* c */ - {0}, /* d */ - {0}, /* e */ - {0}, /* f */ - {0}, /* g */ - {CUS_HALFOP, 0, check_valid_op}, - {0}, /* i */ - {0}, /* j */ - {0}, /* k */ - {0}, /* l */ - {0}, /* m */ - {0}, /* n */ - {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op}, - {0}, /* p */ - {0}, /* q */ - {0}, /* r */ - {0}, /* s */ - {0}, /* t */ - {0}, /* u */ - {CUS_VOICE, 0, NULL}, - {0}, /* w */ - {0}, /* x */ - {0}, /* y */ - {0}, /* z */ - {0}, {0}, {0}, {0}, {0} -}; + if (UsePrivmsg) { + anope_cmd_privmsg2(source, dest, buf); + } else { + send_cmd(source, "NOTICE %s :%s", dest, buf); + } + } + void anope_cmd_notice2(char *source, char *dest, char *msg) { + send_cmd(source, "NOTICE %s :%s", dest, msg); + } + void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...) { + va_list args; + char buf[BUFSIZE]; + *buf = '\0'; -void anope_cmd_notice(char *source, char *dest, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + if (!buf) { + return; + } - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } - if (!buf) { - return; + send_cmd(source, "PRIVMSG %s :%s", dest, buf); } - if (UsePrivmsg) { - anope_cmd_privmsg2(source, dest, buf); - } else { - send_cmd(source, "NOTICE %s :%s", dest, buf); + void anope_cmd_privmsg2(char *source, char *dest, char *msg) { + send_cmd(source, "PRIVMSG %s :%s", dest, msg); } -} -void anope_cmd_notice2(char *source, char *dest, char *msg) -{ - send_cmd(source, "NOTICE %s :%s", dest, msg); -} - -void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } - if (!buf) { - return; + void anope_cmd_serv_notice(char *source, char *dest, char *msg) { + send_cmd(source, "NOTICE $$%s :%s", dest, msg); } - send_cmd(source, "PRIVMSG %s :%s", dest, buf); -} + void anope_cmd_serv_privmsg(char *source, char *dest, char *msg) { + send_cmd(source, "PRIVMSG $$%s :%s", dest, msg); + } -void anope_cmd_privmsg2(char *source, char *dest, char *msg) -{ - send_cmd(source, "PRIVMSG %s :%s", dest, msg); -} -void anope_cmd_serv_notice(char *source, char *dest, char *msg) -{ - send_cmd(source, "NOTICE $$%s :%s", dest, msg); -} + void anope_cmd_global(char *source, const char *fmt, ...) { + va_list args; + char buf[BUFSIZE]; + *buf = '\0'; -void anope_cmd_serv_privmsg(char *source, char *dest, char *msg) -{ - send_cmd(source, "PRIVMSG $$%s :%s", dest, msg); -} + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + if (!buf) { + return; + } + send_cmd(source ? source : ServerName, "OPERWALL :%s", buf); + } -void anope_cmd_global(char *source, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); + int anope_event_sjoin(char *source, int ac, char **av) { + do_sjoin(source, ac, av); + return MOD_CONT; } - if (!buf) { - return; + + int anope_event_nick(char *source, int ac, char **av) { + if (ac != 2) { + User *user = do_nick(source, av[0], av[4], av[5], av[6], av[7], + strtoul(av[2], NULL, 10), 0, 0, NULL, + NULL); + if (user) + anope_set_umode(user, 1, &av[3]); + } else { + do_nick(source, av[0], NULL, NULL, NULL, NULL, + strtoul(av[1], NULL, 10), 0, 0, NULL, NULL); + } + return MOD_CONT; } - send_cmd(source ? source : ServerName, "OPERWALL :%s", buf); -} + int anope_event_topic(char *source, int ac, char **av) { + if (ac == 4) { + do_topic(source, ac, av); + } else { + Channel *c = findchan(av[0]); + time_t topic_time = time(NULL); + + if (!c) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + return MOD_CONT; + } + if (check_topiclock(c, topic_time)) + return MOD_CONT; -int anope_event_sjoin(char *source, int ac, char **av) -{ - do_sjoin(source, ac, av); - return MOD_CONT; -} + if (c->topic) { + free(c->topic); + c->topic = NULL; + } + if (ac > 1 && *av[1]) + c->topic = sstrdup(av[1]); -int anope_event_nick(char *source, int ac, char **av) -{ - if (ac != 2) { - User *user = do_nick(source, av[0], av[4], av[5], av[6], av[7], - strtoul(av[2], NULL, 10), 0, 0, NULL, NULL); - if (user) - anope_set_umode(user, 1, &av[3]); - } else { - do_nick(source, av[0], NULL, NULL, NULL, NULL, - strtoul(av[1], NULL, 10), 0, 0, NULL, NULL); - } - return MOD_CONT; -} + strscpy(c->topic_setter, source, sizeof(c->topic_setter)); + c->topic_time = topic_time; -int anope_event_topic(char *source, int ac, char **av) -{ - if (ac == 4) { - do_topic(source, ac, av); - } else { - Channel *c = findchan(av[0]); - time_t topic_time = time(NULL); - - if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); - return MOD_CONT; + record_topic(av[0]); } + return MOD_CONT; + } - if (check_topiclock(c, topic_time)) + int anope_event_436(char *source, int ac, char **av) { + if (ac < 1) return MOD_CONT; - if (c->topic) { - free(c->topic); - c->topic = NULL; - } - if (ac > 1 && *av[1]) - c->topic = sstrdup(av[1]); - - strscpy(c->topic_setter, source, sizeof(c->topic_setter)); - c->topic_time = topic_time; - - record_topic(av[0]); - } - return MOD_CONT; -} - -int anope_event_436(char *source, int ac, char **av) -{ - if (ac < 1) + m_nickcoll(av[0]); return MOD_CONT; - - m_nickcoll(av[0]); - return MOD_CONT; -} + } /* *INDENT-OFF* */ @@ -637,69 +619,56 @@ void moduleAddIRCDMsgs(void) { /* *INDENT-ON* */ -void anope_cmd_sqline(char *mask, char *reason) -{ + void anope_cmd_sqline(char *mask, char *reason) { -} -void anope_cmd_unsgline(char *mask) -{ + } + void anope_cmd_unsgline(char *mask) { /* Does not support */ -} + } -void anope_cmd_unszline(char *mask) -{ - /* Does not support */ -} -void anope_cmd_szline(char *mask, char *reason) -{ - /* Does not support */ -} + void anope_cmd_unszline(char *mask) { + /* Does not support */ + } + void anope_cmd_szline(char *mask, char *reason) { + /* Does not support */ + } -void anope_cmd_svsnoop(char *server, int set) -{ - /* does not support */ -} + void anope_cmd_svsnoop(char *server, int set) { + /* does not support */ + } -void anope_cmd_svsadmin(char *server, int set) -{ - anope_cmd_svsnoop(server, set); -} + void anope_cmd_svsadmin(char *server, int set) { + anope_cmd_svsnoop(server, set); + } -void anope_cmd_sgline(char *mask, char *reason) -{ - /* does not support */ -} + void anope_cmd_sgline(char *mask, char *reason) { + /* does not support */ + } -void anope_cmd_remove_akill(char *user, char *host) -{ - /* does not support */ -} + void anope_cmd_remove_akill(char *user, char *host) { + /* does not support */ + } -void anope_cmd_topic(char *whosets, char *chan, char *whosetit, - char *topic, time_t when) -{ - send_cmd(whosets, "TOPIC %s :%s", chan, topic); -} + void anope_cmd_topic(char *whosets, char *chan, char *whosetit, + char *topic, time_t when) { + send_cmd(whosets, "TOPIC %s :%s", chan, topic); + } -void anope_cmd_vhost_off(char *nick) -{ - /* does not support vhosting */ -} + void anope_cmd_vhost_off(char *nick) { + /* does not support vhosting */ + } -void anope_cmd_vhost_on(char *nick, char *vIdent, char *vhost) -{ - /* does not support vhosting */ -} + void anope_cmd_vhost_on(char *nick, char *vIdent, char *vhost) { + /* does not support vhosting */ + } -void anope_cmd_unsqline(char *user) -{ - /* Hybrid does not support SQLINEs */ -} + void anope_cmd_unsqline(char *user) { + /* Hybrid does not support SQLINEs */ + } -void anope_cmd_join(char *user, char *channel, time_t chantime) -{ - send_cmd(NULL, "SJOIN %ld %s + :%s", time(NULL), channel, user); -} + void anope_cmd_join(char *user, char *channel, time_t chantime) { + send_cmd(NULL, "SJOIN %ld %s + :%s", time(NULL), channel, user); + } /* oper: the nick of the oper performing the kline @@ -710,59 +679,54 @@ host: the 'host' portion of the kline reason: the reason for the kline. */ -void anope_cmd_akill(char *user, char *host, char *who, time_t when, - time_t expires, char *reason) -{ - send_cmd(s_OperServ, "KLINE * %ld %s %s :%s", - (expires - (long) time(NULL)), user, host, reason); -} + void anope_cmd_akill(char *user, char *host, char *who, time_t when, + time_t expires, char *reason) { + send_cmd(s_OperServ, "KLINE * %ld %s %s :%s", + (expires - (long) time(NULL)), user, host, reason); + } -void anope_cmd_svskill(char *source, char *user, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; + void anope_cmd_svskill(char *source, char *user, const char *fmt, ...) { + va_list args; + char buf[BUFSIZE]; + *buf = '\0'; - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } - if (!buf) { - return; - } + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } + if (!buf) { + return; + } - if (!source || !user) { - return; - } + if (!source || !user) { + return; + } - send_cmd(source, "KILL %s :%s", user, buf); -} + send_cmd(source, "KILL %s :%s", user, buf); + } -void anope_cmd_svsmode(User * u, int ac, char **av) -{ - /* Hybrid does not support SVSMODE */ -} + void anope_cmd_svsmode(User * u, int ac, char **av) { + /* Hybrid does not support SVSMODE */ + } -void anope_cmd_connect(int servernum) -{ - if (servernum == 1) - anope_cmd_pass(RemotePassword); - else if (servernum == 2) - anope_cmd_pass(RemotePassword2); - else if (servernum == 3) - anope_cmd_pass(RemotePassword3); - - anope_cmd_capab(); - anope_cmd_server(ServerName, 1, ServerDesc); - anope_cmd_svinfo(); -} + void anope_cmd_connect(int servernum) { + if (servernum == 1) + anope_cmd_pass(RemotePassword); + else if (servernum == 2) + anope_cmd_pass(RemotePassword2); + else if (servernum == 3) + anope_cmd_pass(RemotePassword3); + + anope_cmd_capab(); + anope_cmd_server(ServerName, 1, ServerDesc); + anope_cmd_svinfo(); + } -void anope_cmd_svsinfo() -{ - /* not used */ -} + void anope_cmd_svsinfo() { + /* not used */ + } /* * SVINFO @@ -772,10 +736,9 @@ void anope_cmd_svsinfo() * parv[3] = server is standalone or connected to non-TS only * parv[4] = server's idea of UTC time */ -void anope_cmd_svinfo() -{ - send_cmd(NULL, "SVINFO 5 5 0 :%ld", time(NULL)); -} + void anope_cmd_svinfo() { + send_cmd(NULL, "SVINFO 5 5 0 :%ld", time(NULL)); + } /* CAPAB */ /* @@ -798,602 +761,546 @@ void anope_cmd_svinfo() PARA - supports invite broadcasting for +p ENCAP - ? */ -void anope_cmd_capab() -{ - send_cmd(NULL, - "CAPAB :QS EX CHW IE EOB KLN GLN HOPS HUB AOPS KNOCK TBURST PARA"); -} + void anope_cmd_capab() { + send_cmd(NULL, + "CAPAB :QS EX CHW IE EOB KLN GLN HOPS HUB AOPS KNOCK TBURST PARA"); + } /* PASS */ -void anope_cmd_pass(char *pass) -{ - send_cmd(NULL, "PASS %s :TS", pass); -} + void anope_cmd_pass(char *pass) { + send_cmd(NULL, "PASS %s :TS", pass); + } /* SERVER name hop descript */ -void anope_cmd_server(char *servname, int hop, char *descript) -{ - send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); -} + void anope_cmd_server(char *servname, int hop, char *descript) { + send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); + } -void anope_cmd_bot_nick(char *nick, char *user, char *host, char *real, - char *modes) -{ - EnforceQlinedNick(nick, s_BotServ); - send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick, time(NULL), - modes, user, host, ServerName, real); + void anope_cmd_bot_nick(char *nick, char *user, char *host, char *real, + char *modes) { + EnforceQlinedNick(nick, s_BotServ); + send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick, time(NULL), + modes, user, host, ServerName, real); -} + } -void anope_cmd_part(char *nick, char *chan, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; + void anope_cmd_part(char *nick, char *chan, const char *fmt, ...) { + va_list args; + char buf[BUFSIZE]; + *buf = '\0'; - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } + if (fmt) { + va_start(args, fmt); + vsnprintf(buf, BUFSIZE - 1, fmt, args); + va_end(args); + } - if (buf) { - send_cmd(nick, "PART %s :%s", chan, buf); - } else { - send_cmd(nick, "PART %s", chan); + if (buf) { + send_cmd(nick, "PART %s :%s", chan, buf); + } else { + send_cmd(nick, "PART %s", chan); + } } -} -int anope_event_ping(char *source, int ac, char **av) -{ - if (ac < 1) + int anope_event_ping(char *source, int ac, char **av) { + if (ac < 1) + return MOD_CONT; + anope_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]); return MOD_CONT; - anope_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]); - return MOD_CONT; -} + } -int anope_event_away(char *source, int ac, char **av) -{ - if (ac < 1) - return MOD_CONT; + int anope_event_away(char *source, int ac, char **av) { + if (ac < 1) + return MOD_CONT; - if (!source) { + if (!source) { + return MOD_CONT; + } + m_away(source, av[0]); return MOD_CONT; } - m_away(source, av[0]); - return MOD_CONT; -} -int anope_event_kill(char *source, int ac, char **av) -{ - if (ac != 2) - return MOD_CONT; + int anope_event_kill(char *source, int ac, char **av) { + if (ac != 2) + return MOD_CONT; - m_kill(av[0], av[1]); - return MOD_CONT; -} + m_kill(av[0], av[1]); + return MOD_CONT; + } -int anope_event_kick(char *source, int ac, char **av) -{ - if (ac != 3) + int anope_event_kick(char *source, int ac, char **av) { + if (ac != 3) + return MOD_CONT; + do_kick(source, ac, av); return MOD_CONT; - do_kick(source, ac, av); - return MOD_CONT; -} + } -int anope_event_eob(char *source, int ac, char **av) -{ - Server *s; - s = findserver(servlist, source); - if (s) { - s->sync = 1; + int anope_event_eob(char *source, int ac, char **av) { + Server *s; + s = findserver(servlist, source); + if (s) { + s->sync = 1; + } + return MOD_CONT; } - return MOD_CONT; -} -void anope_cmd_eob() -{ - send_cmd(ServerName, "EOB"); -} + void anope_cmd_eob() { + send_cmd(ServerName, "EOB"); + } -int anope_event_join(char *source, int ac, char **av) -{ - if (ac != 1) + int anope_event_join(char *source, int ac, char **av) { + if (ac != 1) + return MOD_CONT; + do_join(source, ac, av); return MOD_CONT; - do_join(source, ac, av); - return MOD_CONT; -} + } -int anope_event_motd(char *source, int ac, char **av) -{ - if (!source) { + int anope_event_motd(char *source, int ac, char **av) { + if (!source) { + return MOD_CONT; + } + + m_motd(source); return MOD_CONT; } - m_motd(source); - return MOD_CONT; -} - -int anope_event_privmsg(char *source, int ac, char **av) -{ - if (ac != 2) + int anope_event_privmsg(char *source, int ac, char **av) { + if (ac != 2) + return MOD_CONT; + m_privmsg(source, av[0], av[1]); return MOD_CONT; - m_privmsg(source, av[0], av[1]); - return MOD_CONT; -} + } -int anope_event_part(char *source, int ac, char **av) -{ - if (ac < 1 || ac > 2) + int anope_event_part(char *source, int ac, char **av) { + if (ac < 1 || ac > 2) + return MOD_CONT; + do_part(source, ac, av); return MOD_CONT; - do_part(source, ac, av); - return MOD_CONT; -} + } -int anope_event_whois(char *source, int ac, char **av) -{ - if (source && ac >= 1) { - m_whois(source, av[0]); + int anope_event_whois(char *source, int ac, char **av) { + if (source && ac >= 1) { + m_whois(source, av[0]); + } + return MOD_CONT; } - return MOD_CONT; -} /* EVENT: SERVER */ -int anope_event_server(char *source, int ac, char **av) -{ - char *uplink; + int anope_event_server(char *source, int ac, char **av) { + char *uplink; - if (!stricmp(av[1], "1")) - uplink = sstrdup(av[0]); - do_server(source, av[0], av[1], av[2], NULL); - return MOD_CONT; -} + if (!stricmp(av[1], "1")) + uplink = sstrdup(av[0]); + do_server(source, av[0], av[1], av[2], NULL); + return MOD_CONT; + } -int anope_event_squit(char *source, int ac, char **av) -{ - if (ac != 2) + int anope_event_squit(char *source, int ac, char **av) { + if (ac != 2) + return MOD_CONT; + do_squit(s