diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-04-09 18:17:02 +0100 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-04-10 13:34:25 +0100 |
| commit | 9351debd73cb22f33bc46c201c9d66ec09ea773e (patch) | |
| tree | be92bdd1d1f288f375d6ff7fa00afc3db75e255d /modules/memoserv | |
| parent | 40d558ef21a438bf1dff9ac522cd852166fc4c44 (diff) | |
Expand GetQueryCommand to take a command name.
Diffstat (limited to 'modules/memoserv')
| -rw-r--r-- | modules/memoserv/memoserv.cpp | 12 | ||||
| -rw-r--r-- | modules/memoserv/ms_read.cpp | 4 | ||||
| -rw-r--r-- | modules/memoserv/ms_set.cpp | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/modules/memoserv/memoserv.cpp b/modules/memoserv/memoserv.cpp index a7baa4daf..a95a1fd87 100644 --- a/modules/memoserv/memoserv.cpp +++ b/modules/memoserv/memoserv.cpp @@ -101,7 +101,10 @@ public: if (ci->AccessFor(cu->user).HasPriv("MEMO")) { if (cu->user->IsIdentified() && cu->user->Account()->HasExt("MEMO_RECEIVE")) - cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), MemoServ->GetQueryCommand().c_str(), ci->name.c_str(), mi->memos->size()); + { + cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), MemoServ->GetQueryCommand("memoserv/read").c_str(), + ci->name.c_str(), mi->memos->size()); + } } } } @@ -116,7 +119,7 @@ public: { User *user = User::Find(na->nick, true); if (user && user->IsIdentified()) - user->SendMessage(MemoServ, MEMO_NEW_MEMO_ARRIVED, source.c_str(), MemoServ->GetQueryCommand().c_str(), mi->memos->size()); + user->SendMessage(MemoServ, MEMO_NEW_MEMO_ARRIVED, source.c_str(), MemoServ->GetQueryCommand("memoserv/read").c_str(), mi->memos->size()); } } @@ -229,8 +232,9 @@ public: if (!params.empty() || source.c || source.service != *MemoServ) return; source.Reply(_(" \n" - "Type \002%s HELP \037command\037\002 for help on any of the\n" - "above commands."), MemoServ->GetQueryCommand().c_str()); + "Type \002%s \037command\037\002 for help on any of the\n" + "above commands."), + MemoServ->GetQueryCommand("generic/help").c_str()); } }; diff --git a/modules/memoserv/ms_read.cpp b/modules/memoserv/ms_read.cpp index d1a773838..7878027bf 100644 --- a/modules/memoserv/ms_read.cpp +++ b/modules/memoserv/ms_read.cpp @@ -91,9 +91,9 @@ public: if (Command::FindCommandFromService("memoserv/del", bi, cmd)) { if (ci) - source.Reply(_("To delete, type: \002%s %s %s %d\002"), bi->GetQueryCommand().c_str(), cmd.c_str(), ci->name.c_str(), index + 1); + source.Reply(_("To delete, type: \002%s %s %d\002"), bi->GetQueryCommand({}, cmd).c_str(), ci->name.c_str(), index + 1); else - source.Reply(_("To delete, type: \002%s %s %d\002"), bi->GetQueryCommand().c_str(), cmd.c_str(), index + 1); + source.Reply(_("To delete, type: \002%s %d\002"), bi->GetQueryCommand({}, cmd).c_str(), index + 1); } source.Reply("%s", m->text.c_str()); diff --git a/modules/memoserv/ms_set.cpp b/modules/memoserv/ms_set.cpp index 672aeec3b..ac2f066ba 100644 --- a/modules/memoserv/ms_set.cpp +++ b/modules/memoserv/ms_set.cpp @@ -232,8 +232,9 @@ public: " LIMIT Sets the maximum number of memos you can\n" " receive\n" " \n" - "Type \002%s HELP %s \037option\037\002 for more information\n" - "on a specific option."), source.service->GetQueryCommand().c_str(), source.command.c_str()); + "Type \002%s \037option\037\002 for more information\n" + "on a specific option."), + source.service->GetQueryCommand("generic/help", source.command).c_str()); } else if (subcommand.equals_ci("NOTIFY")) source.Reply(_("Syntax: \002NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}\002\n" |
