mirror of
https://github.com/znc/znc.git
synced 2026-07-05 17:31:06 +02:00
Make chan modes and permissions to be char instead of unsigned char.
Deprecate old module hooks which accept mode as unsigned char.
SWIG handles unsigned char as int, but char as a string.
Before this commit, usage of HasPerm from perl modules required this:
either $chan->HasPerm(ord('@')) or $chan->HasPerm(ord($ZNC::CChan::Op)).
Now ord() is not necessary, and these calls work too:
$chan->HasPerm('@') and $chan->HasPerm($ZNC::CChan::Op).
Fix #1486
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ class CQModule : public CModule {
|
||||
|
||||
if (IsIRCConnected()) {
|
||||
// check for usermode +x if we are already connected
|
||||
set<unsigned char> scUserModes =
|
||||
set<char> scUserModes =
|
||||
GetNetwork()->GetIRCSock()->GetUserModes();
|
||||
if (scUserModes.find('x') != scUserModes.end()) m_bCloaked = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user