diff options
| author | 2008-03-01 17:55:58 +0000 | |
|---|---|---|
| committer | 2008-03-01 17:55:58 +0000 | |
| commit | 4ee1e3a2e1f77592585dcec76d0869da1218fe1b (patch) | |
| tree | 7f649228b3d56966fc7db2f51a8c677c5ac74af0 /src/modules/chan/libkvichan.cpp | |
| parent | backported ukrainian translations (diff) | |
| download | KVIrc-4ee1e3a2e1f77592585dcec76d0869da1218fe1b.tar.gz KVIrc-4ee1e3a2e1f77592585dcec76d0869da1218fe1b.tar.bz2 KVIrc-4ee1e3a2e1f77592585dcec76d0869da1218fe1b.zip | |
Fix for ticket no 39
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1175 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/chan/libkvichan.cpp')
| -rw-r--r-- | src/modules/chan/libkvichan.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/chan/libkvichan.cpp b/src/modules/chan/libkvichan.cpp index fb27c31b4..08c867cba 100644 --- a/src/modules/chan/libkvichan.cpp +++ b/src/modules/chan/libkvichan.cpp @@ -629,6 +629,7 @@ static bool chan_kvs_fnc_ison(KviKvsModuleFunctionCall * c) '+' for voiced users[br] '-' for userops[br] If the user has more than one flag then the highest one is returned.[br] + If the user has no flag at all then an empty string is returned. */ static bool chan_kvs_fnc_getflag(KviKvsModuleFunctionCall * c) @@ -641,8 +642,14 @@ static bool chan_kvs_fnc_getflag(KviKvsModuleFunctionCall * c) KviChannel * ch = chan_kvs_find_channel(c,szId); if(ch) { - QString szFlag = QChar(ch->userListView()->getUserFlag(szNick)); - c->returnValue()->setString(szFlag); + QChar cFlag = ch->userListView()->getUserFlag(szNick); + if(cFlag != QChar(0)) + { + QString szFlag = cFlag; + c->returnValue()->setString(szFlag); + } else { + c->returnValue()->setNothing(); + } } return true; } |
