summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--Changes.lang5
-rw-r--r--lang/cat.l18
-rw-r--r--lang/de.l18
-rw-r--r--lang/en_us.l18
-rw-r--r--lang/es.l18
-rw-r--r--lang/fr.l18
-rw-r--r--lang/gr.l18
-rw-r--r--lang/hun.l18
-rw-r--r--lang/it.l18
-rw-r--r--lang/nl.l18
-rw-r--r--lang/pl.l18
-rw-r--r--lang/pt.l18
-rw-r--r--lang/ru.l18
-rw-r--r--lang/tr.l18
-rw-r--r--src/core/ns_saset.c34
-rw-r--r--version.log6
17 files changed, 275 insertions, 5 deletions
diff --git a/Changes b/Changes
index 47c127469..8b9afb671 100644
--- a/Changes
+++ b/Changes
@@ -39,6 +39,7 @@ Anope Version S V N
02/12 F rdb_close() where rdb_open() is used in rdb_dbase() functions. [#862]
02/12 F Removed extra loop when parsing defcon modes. [#867]
02/12 A Added SUSPENDED to NS LIST keywords. [#869]
+02/12 A Added NS SASET LANGUAGE. [#872]
Provided by Trystan <trystan@nomadirc.net> - 2008
02/11 F Last part of memory leak in cs_akick() [#870]
diff --git a/Changes.lang b/Changes.lang
index 5688abe7d..c669859f1 100644
--- a/Changes.lang
+++ b/Changes.lang
@@ -1,9 +1,14 @@
Anope Version S V N
--------------------
*** New Strings:
+ NICK_SASET_LANGUAGE_SYNTAX
+ NICK_SASET_LANGUAGE_UNKNOWN
+ NICK_SASET_LANGUAGE_CHANGED
+ NICK_HELP_SASET_LANGUAGE
NICK_HELP_RESEND
*** Mod Strings:
+ NICK_HELP_SASET
NICK_RECOVERED
NICK_LIST_SERVADMIN_SYNTAX
NICK_SERVADMIN_HELP_LIST
diff --git a/lang/cat.l b/lang/cat.l
index 63907f3ed..052e34bca 100644
--- a/lang/cat.l
+++ b/lang/cat.l
@@ -703,6 +703,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Catalan.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3836,6 +3844,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3974,6 +3984,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Sintaxis: RECOVER nickname [clau]
diff --git a/lang/de.l b/lang/de.l
index 83886e20d..19cbd532d 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -719,6 +719,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to German.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3843,6 +3851,8 @@ NICK_HELP_SASET
MSG Bestimmt die Art wie die Services Nachrichten senden
NOEXPIRE Verhindert, dass der Nickname nach einer bestimmten
Zeit verfдllt
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Mit %R%S HELP SASET option kцnnen mehr Informationen zu
den Einstellungen angefordert werden. Die Einstellungen betreffen den
@@ -3995,6 +4005,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Syntax: RECOVER Nickname [Passwort]
diff --git a/lang/en_us.l b/lang/en_us.l
index 87692cda3..bbdb14d4e 100644
--- a/lang/en_us.l
+++ b/lang/en_us.l
@@ -688,6 +688,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to English.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3700,6 +3708,8 @@ NICK_HELP_SASET
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
AUTOOP Turn autoop on or off
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3810,6 +3820,14 @@ NICK_HELP_SASET_AUTOOP
Set to ON to allow ChanServ to op you automatically when joining
channels.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Syntax: RECOVER nickname [password]
diff --git a/lang/es.l b/lang/es.l
index 35baba58a..c437179b0 100644
--- a/lang/es.l
+++ b/lang/es.l
@@ -707,6 +707,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Spanish.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3810,6 +3818,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3948,6 +3958,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Sintaxis: RECOVER nickname [clave]
diff --git a/lang/fr.l b/lang/fr.l
index dbaafe59d..c685aa693 100644
--- a/lang/fr.l
+++ b/lang/fr.l
@@ -713,6 +713,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to French.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3873,6 +3881,8 @@ NICK_HELP_SASET
HIDE Cache certaine informations personnel au pseudo
MSG Change le mode de communication des services
NOEXPIRE Empкche le pseudo d'expirer
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Taper %R%S HELP SASET option pour plus d'information
sur une option spйcifique. L'option devra etre mise avec le pseudo
@@ -4012,6 +4022,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Syntaxe: RECOVER pseudo [motdepasse]
diff --git a/lang/gr.l b/lang/gr.l
index 32db788db..5fd2028de 100644
--- a/lang/gr.l
+++ b/lang/gr.l
@@ -701,6 +701,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Greek.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3837,6 +3845,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3975,6 +3985,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Уэнфбоз: RECOVER nickname [password]
diff --git a/lang/hun.l b/lang/hun.l
index 6b8a07220..12020d545 100644
--- a/lang/hun.l
+++ b/lang/hun.l
@@ -700,6 +700,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Hungarian.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3757,6 +3765,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3895,6 +3905,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Syntax: RECOVER nicknйv [jelszу]
diff --git a/lang/it.l b/lang/it.l
index cc84dc644..eef2668a9 100644
--- a/lang/it.l
+++ b/lang/it.l
@@ -696,6 +696,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Italian.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3724,6 +3732,8 @@ NICK_HELP_SASET
HIDE Nsconde alcune informazioni sul nick
MSG Cambia il metodo di comunicazione usato dai servizi
NOEXPIRE Evita che il nickname scada
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Digita %R%S HELP SASET opzione per maggiori informazioni
su un'opzione specifica. Le opzioni verranno impostate sul
@@ -3860,6 +3870,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Sintassi: RECOVER nick [password]
diff --git a/lang/nl.l b/lang/nl.l
index b10793a73..0e41beb93 100644
--- a/lang/nl.l
+++ b/lang/nl.l
@@ -712,6 +712,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Dutch.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3789,6 +3797,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3899,6 +3909,14 @@ NICK_HELP_SASET_AUTOOP
Set to ON to allow ChanServ to op you automatically when joining
channels.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Gebruik: RECOVER nick [wachtwoord]
diff --git a/lang/pl.l b/lang/pl.l
index fd4ba44f9..ad6e5ef36 100644
--- a/lang/pl.l
+++ b/lang/pl.l
@@ -752,6 +752,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Polish.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -4016,6 +4024,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -4154,6 +4164,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Skіadnia: RECOVER nick [hasіo]
diff --git a/lang/pt.l b/lang/pt.l
index c32d40392..f1955251a 100644
--- a/lang/pt.l
+++ b/lang/pt.l
@@ -707,6 +707,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Portuguese.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3739,6 +3747,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3877,6 +3887,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Sintaxe: RECOVER nick [senha]
diff --git a/lang/ru.l b/lang/ru.l
index 29898691a..8236e5054 100644
--- a/lang/ru.l
+++ b/lang/ru.l
@@ -690,6 +690,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Теперь, сервисы больше не будут автоматически давать статус для %s на каналах.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Russian.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3706,6 +3714,8 @@ NICK_HELP_SASET
MSG Изменяет режим сообщения с сервисами
NOEXPIRE Устанавливает на ник режим не-истечения
AUTOOP Включает или выключает режим автостатуса
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Введите %R%S HELP SASET опция для большей информации
о какой-либо опции. Опции будут установлены для указаного
@@ -3814,6 +3824,14 @@ NICK_HELP_SASET_AUTOOP
на каналах. Установите в ON, если хотите, что бы ChanServ
автоматически давал статус нику при заходе на канал.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Синтаксис: RECOVER ник [пароль]
diff --git a/lang/tr.l b/lang/tr.l
index 40d94b5b7..a4488c0af 100644
--- a/lang/tr.l
+++ b/lang/tr.l
@@ -708,6 +708,14 @@ NICK_SASET_AUTOOP_ON
NICK_SASET_AUTOOP_OFF
Services will no longer autoop %s in channels.
+# SASET LANGUAGE responses
+NICK_SASET_LANGUAGE_SYNTAX
+ SASET LANGUAGE number
+NICK_SASET_LANGUAGE_UNKNOWN
+ Unknown language number %d. Type %R%s HELP SET LANGUAGE for a list of languages.
+NICK_SASET_LANGUAGE_CHANGED
+ Language changed to Turkish.
+
# ACCESS responses
NICK_ACCESS_SYNTAX
@@ -3831,6 +3839,8 @@ NICK_HELP_SASET
HIDE Hide certain pieces of nickname information
MSG Change the communication method of Services
NOEXPIRE Prevent the nickname from expiring
+ LANGUAGE Set the language Services will use when
+ sending messages to nickname
Type %R%S HELP SASET option for more information
on a specific option. The options will be set on the given
@@ -3969,6 +3979,14 @@ NICK_HELP_SASET_AUTOOP
Limited to Services admins.
+NICK_HELP_SASET_LANGUAGE
+ Syntax: SASET nickname LANGUAGE number
+
+ Changes the language Services uses when sending messages to
+ nickname (for example, when responding to a command he sends).
+ number should be chosen from a list of supported languages
+ that you can get by typing %R%S HELP SET LANGUAGE.
+
NICK_HELP_RECOVER
Kullanэmэ: RECOVER nick [юifre]
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c
index ce962a645..ce790d6b2 100644
--- a/src/core/ns_saset.c
+++ b/src/core/ns_saset.c
@@ -30,6 +30,7 @@ int do_saset_msg(User * u, NickCore * nc, char *param);
int do_saset_hide(User * u, NickCore * nc, char *param);
int do_saset_noexpire(User * u, NickAlias * nc, char *param);
int do_saset_autoop(User * u, NickCore * nc, char *param);
+int do_saset_language(User * u, NickCore * nc, char *param);
void myNickServHelp(User * u);
/**
@@ -90,6 +91,9 @@ int AnopeInit(int argc, char **argv)
-1, NICK_HELP_SASET_AUTOOP,
NICK_HELP_SASET_AUTOOP);
moduleAddCommand(NICKSERV, c, MOD_UNIQUE);
+ c = createCommand("SASET LANGUAGE", NULL, is_services_oper,
+ -1, -1, -1, -1, NICK_HELP_SASET_LANGUAGE);
+ moduleAddCommand(NICKSERV, c, MOD_UNIQUE);
moduleSetNickHelp(myNickServHelp);
@@ -180,6 +184,8 @@ int do_saset(User * u)
do_saset_noexpire(u, na, param);
} else if (stricmp(cmd, "AUTOOP") == 0) {
do_saset_autoop(u, na->nc, param);
+ } else if (stricmp(cmd, "LANGUAGE") == 0) {
+ do_saset_language(u, na->nc, param);
} else {
notice_lang(s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd);
}
@@ -231,10 +237,10 @@ int do_saset_password(User * u, NickCore * nc, char *param)
return MOD_CONT;
}
- if (len > PASSMAX) {
- len = PASSMAX;
- param[len] = 0;
- notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX);
+ if (len > PASSMAX) {
+ len = PASSMAX;
+ param[len] = 0;
+ notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX);
}
if (nc->pass)
@@ -512,5 +518,25 @@ int do_saset_autoop(User * u, NickCore * nc, char *param)
return MOD_CONT;
}
+int do_saset_language(User * u, NickCore * nc, char *param)
+{
+ int langnum;
+
+ if (param[strspn(param, "0123456789")] != 0) { /* i.e. not a number */
+ syntax_error(s_NickServ, u, "SASET LANGUAGE",
+ NICK_SASET_LANGUAGE_SYNTAX);
+ return MOD_CONT;
+ }
+ langnum = atoi(param) - 1;
+ if (langnum < 0 || langnum >= NUM_LANGS || langlist[langnum] < 0) {
+ notice_lang(s_NickServ, u, NICK_SASET_LANGUAGE_UNKNOWN, langnum + 1,
+ s_NickServ);
+ return MOD_CONT;
+ }
+ nc->language = langlist[langnum];
+ notice_lang(s_NickServ, u, NICK_SASET_LANGUAGE_CHANGED);
+
+ return MOD_CONT;
+}
/* EOF */
diff --git a/version.log b/version.log
index b2f50719b..d66993628 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="21"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1388"
+VERSION_BUILD="1389"
# $Log$
#
+# BUILD : 1.7.21 (1389)
+# BUGS : 872
+# NOTES : Added NS SASET LANGUAGE
+#
# BUILD : 1.7.21 (1388)
# BUGS : N/A
# NOTES : Modified NS LIST help messages to add SUSPENDED keyword.