From d91e0894c190a642518f7ee7e8b92b2540eb591f Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Thu, 4 Feb 2016 07:50:08 +0100 Subject: [PATCH] attempt to make irc error messages more informative --- world/default/en/irc.textdb | 8 +++++++- world/net/irc/common.c | 4 ---- world/net/text.c | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/world/default/en/irc.textdb b/world/default/en/irc.textdb index b2d8a5b..6b8b859 100644 --- a/world/default/en/irc.textdb +++ b/world/default/en/irc.textdb @@ -132,9 +132,15 @@ _error_status_place_matches |## |## NOTICE * :Du bist doch schon da! +_error_place_enter_necessary_invitation +|##define ERR_BADCHANNELKEY "475" +|#475 [_INTERNAL_nick_me] #[_nick_place] :{_error_place_enter_necessary_invitation} + _error_place_enter |## 471 is ERR_CHANISFULL -|#471 [_INTERNAL_nick_me] #[_nick_place] :Error entering [_nick_place]. +|#471 [_INTERNAL_nick_me] #[_nick_place] :{_VAR_data} +|## was: Error entering [_nick_place]. +|## would love to put [_data] or {_method} in there, but do they work the way i mean it? _query_password |## Please provide your password. (If your client isn't able to, use /quote pass «your-password» (which does not work in irssi) or use a syntax like /server {_VAR_server} «ircport» «your-password») diff --git a/world/net/irc/common.c b/world/net/irc/common.c index 1c9e06a..5e45e07 100644 --- a/world/net/irc/common.c +++ b/world/net/irc/common.c @@ -158,11 +158,7 @@ render(string mc, string data, mapping vars, mixed source) { mixed t; P3(("common:render %O %O\n", ME, data)); -#if 1 // def IRCEXPERIMENTAL template = T(mc, 0); // enable textdb inheritance -#else - template = T(mc, ""); -#endif #ifndef _flag_disable_stamp_time_IRC t = vars["_time_place"] || vars["_time_log"]; // this goes thru ->v() diff --git a/world/net/text.c b/world/net/text.c index 7554981..bc28378 100644 --- a/world/net/text.c +++ b/world/net/text.c @@ -205,6 +205,7 @@ summon(layout, lang, scheme) { lookup(string mc, mixed fmt, object ghost, object curse) { string file, in; + mixed ofmt = fmt; #ifdef NOTEXTCACHE int dont_cache = 0; #endif /* NOTEXTCACHE */ @@ -329,6 +330,9 @@ lookup(string mc, mixed fmt, object ghost, object curse) { case "VAR_server_uniform": in = before + SERVER_UNIFORM + after; break; + case "VAR_data": // not sure if this makes sense, --lynX 2016 + in = before + ofmt + after; + break; case "VAR_method": PT(("using %O for %O\n", mc, code)) code = mc[1..];