summaryrefslogtreecommitdiff
path: root/src/core/cs_getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cs_getkey.c')
-rw-r--r--src/core/cs_getkey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/cs_getkey.c b/src/core/cs_getkey.c
index 7d1fa8637..8c1e127ee 100644
--- a/src/core/cs_getkey.c
+++ b/src/core/cs_getkey.c
@@ -26,6 +26,7 @@ class CommandCSGetKey : public Command
{
const char *chan = params[0].c_str();
ChannelInfo *ci;
+ std::string key;
ci = cs_findchan(chan);
@@ -35,13 +36,13 @@ class CommandCSGetKey : public Command
return MOD_CONT;
}
- if (!ci->c || !ci->c->key)
+ if (!ci->c || !ci->c->GetParam(CMODE_KEY, &key))
{
notice_lang(s_ChanServ, u, CHAN_GETKEY_NOKEY, chan);
return MOD_CONT;
}
- notice_lang(s_ChanServ, u, CHAN_GETKEY_KEY, chan, ci->c->key);
+ notice_lang(s_ChanServ, u, CHAN_GETKEY_KEY, chan, key.c_str());
return MOD_CONT;
}