diff options
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/cs_access.cpp | 21 | ||||
-rw-r--r-- | modules/commands/cs_info.cpp | 2 | ||||
-rw-r--r-- | modules/commands/ns_info.cpp | 2 |
3 files changed, 19 insertions, 6 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index a8e90aadd..7ec65328a 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -588,8 +588,9 @@ class CommandCSAccess : public Command "list specifies which users are allowed chanop status or\n" "access to %s commands on the channel. Different\n" "user levels allow for access to different subsets of\n" - "privileges. Any nick not on the access list has\n" - "a user level of 0."), source.owner->nick.c_str()); + "privileges. Any registered user not on the access list has\n" + "a user level of 0, and any unregistered user has a user level\n" + "of -1."), source.owner->nick.c_str()); source.Reply(" "); source.Reply(_("The \002ACCESS ADD\002 command adds the given mask to the\n" "access list with the given user level; if the mask is\n" @@ -635,7 +636,6 @@ class CommandCSAccess : public Command " \002 3\002 Automatic voicing.\n" " \002 0\002 No special privileges; can be opped by other\n" " ops (unless \002secure-ops\002 is set).\n" - " \002 <0\002 May not be opped.\n" " \n" "These levels may be changed, or new ones added, using the\n" "\002LEVELS\002 command; type \002%s%s HELP LEVELS\002 for\n" @@ -886,7 +886,7 @@ class CSAccess : public Module ModuleManager::RegisterService(&commandcsaccess); ModuleManager::RegisterService(&commandcslevels); - Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCreateChan }; + Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCreateChan, I_OnGroupCheckPriv }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); this->OnReload(); @@ -919,6 +919,19 @@ class CSAccess : public Module { reset_levels(ci); } + + EventReturn OnGroupCheckPriv(const AccessGroup *group, ChannelAccess priv) + { + if (group->ci == NULL) + return EVENT_CONTINUE; + /* Special case. Allows a level of < 0 to match anyone, and a level of 0 to match anyone identified. */ + int16 level = group->ci->levels[priv]; + if (level < 0) + return EVENT_ALLOW; + else if (level == 0 && group->nc) + return EVENT_ALLOW; + return EVENT_CONTINUE; + } }; MODULE_INIT(CSAccess) diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 9f4a29852..5cc100c78 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -93,7 +93,7 @@ class CommandCSInfo : public Command CheckOptStr(optbuf, CI_PERSIST, _("Persistant"), ci, u->Account()); CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, u->Account()); - source.Reply(NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str()); + source.Reply(_(" Options: %s"), optbuf.empty() ? _("None") : optbuf.c_str()); source.Reply(_(" Mode lock: %s"), ci->GetMLockAsString(true).c_str()); if (!ci->HasFlag(CI_NO_EXPIRE)) diff --git a/modules/commands/ns_info.cpp b/modules/commands/ns_info.cpp index 15dc22546..e40f80f77 100644 --- a/modules/commands/ns_info.cpp +++ b/modules/commands/ns_info.cpp @@ -118,7 +118,7 @@ class CommandNSInfo : public Command CheckOptStr(optbuf, NI_MSG, _("Message mode"), na->nc); CheckOptStr(optbuf, NI_AUTOOP, _("Auto-op"), na->nc); - source.Reply(NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str()); + source.Reply(_(" Options: %s"), optbuf.empty() ? _("None") : optbuf.c_str()); if (na->nc->HasFlag(NI_SUSPENDED)) { |