diff options
| author | 2010-08-17 18:05:36 +0000 | |
|---|---|---|
| committer | 2010-08-17 18:05:36 +0000 | |
| commit | 3720126545edcf4a976568f2d740ab5d8d86940e (patch) | |
| tree | a9a9685f97f5f1f1ff0290c28eea3319b38bb7e3 /src/modules/chan | |
| parent | Fix an undetected syntax error in tmphighlight. (diff) | |
| download | KVIrc-3720126545edcf4a976568f2d740ab5d8d86940e.tar.gz KVIrc-3720126545edcf4a976568f2d740ab5d8d86940e.tar.bz2 KVIrc-3720126545edcf4a976568f2d740ab5d8d86940e.zip | |
Reworked the way kvirc parses channel modes;
addded to the mode editor the ability to set/unset additional modes with parameters and added a throttle to handle correctly multiple mode changes in a single row
still wip: modewidget (still lacks the ability to show the additional modes), encoding stuff
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4891 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/chan')
| -rw-r--r-- | src/modules/chan/libkvichan.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/modules/chan/libkvichan.cpp b/src/modules/chan/libkvichan.cpp index e9647f436..d5c767aaf 100644 --- a/src/modules/chan/libkvichan.cpp +++ b/src/modules/chan/libkvichan.cpp @@ -112,10 +112,10 @@ static bool chan_kvs_fnc_getUrl(KviKvsModuleFunctionCall * c) if (ch) { KviIrcUrl::join(url,ch->connection()->target()->server()); url.append(ch->windowName()); - if(ch->hasChannelKey()) + if(ch->hasChannelMode('k')) { - url.append('?'); - url.append(ch->channelKey()); + url.append("?"); + url.append(ch->channelModeParam('k')); } } else { if(c->window()->connection()) { @@ -942,7 +942,7 @@ static bool chan_kvs_fnc_key(KviKvsModuleFunctionCall * c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szId); - if (ch) c->returnValue()->setString(ch->channelKey()); + if (ch) c->returnValue()->setString(ch->hasChannelMode('k') ? ch->channelModeParam('k') : ""); return true; } @@ -972,14 +972,10 @@ static bool chan_kvs_fnc_limit(KviKvsModuleFunctionCall * c) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szId); kvs_int_t limit=0; - QString lim; if (ch) { - if(ch->hasChannelLimit()) - { - lim = ch->channelLimit().toUtf8().data(); - limit = lim.toInt(); - } + if(ch->hasChannelMode('l')) + limit = ch->channelModeParam('l').toInt(); c->returnValue()->setInteger(limit); } return true; |
