View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001416 | Anope Development (1.9.x series) | Nickserv | public | 2012-05-08 04:54 | 2012-05-08 07:04 |
Reporter | Robby | Assigned To | Adam | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Summary | 0001416: Allow services opers to '/ns release' other people's nicks aswell as allow '/ns access list' on other services opers again | ||||
Description | Attached is a small patch for a feature request for ns_release, a small revert in behavior because of a change to ns_access and the addition of SUSPEND to the description of secureadmins in nickserv.example.conf. ns_release: I made a change to it to allow services operators to manually release nicknames from other people. Useful for smoother help/support. Also corrected Log() messages text. ns_access: In older versions, up to revision 781ed11b, it was possible to view the access list of other services operators, even when secureadmins was enabled. Since 781ed11b not even viewing that list is possible anymore, this reverts that behavior. I found this most handy to assist fellow operators in setting up their NickServ access list. | ||||
Tags | No tags attached. | ||||
|
25586f32467334f0366ce0b8bfe16e2d5e005851 |
|
ns.patch (3,587 bytes)
diff -urN anope-1.9-42e652c/data/example.conf anope-1.9-42e652c+ns/data/example.conf --- anope-1.9-42e652c/data/example.conf 2012-05-02 16:48:59.000000000 +0200 +++ anope-1.9-42e652c+ns/data/example.conf 2012-05-03 15:36:20.000000000 +0200 @@ -753,7 +753,7 @@ * memoserv/sendall memoserv/staff * * nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend - * nickserv/resetpass + * nickserv/resetpass nickserv/release * * nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet * nickserv/saset/icq nickserv/saset/kill nickserv/saset/language nickserv/saset/message diff -urN anope-1.9-42e652c/data/nickserv.example.conf anope-1.9-42e652c+ns/data/nickserv.example.conf --- anope-1.9-42e652c/data/nickserv.example.conf 2012-05-02 16:48:59.000000000 +0200 +++ anope-1.9-42e652c+ns/data/nickserv.example.conf 2012-05-03 15:19:47.000000000 +0200 @@ -221,8 +221,8 @@ guestnickprefix = "Guest" /* - * Prevents the use of the ACCESS, DROP, FORBID, GETPASS, and SET PASSWORD commands by Services Admins - * on other Services Admins or the Services Root(s). + * Prevents the use of the ACCESS (excluding the LIST subcommand), DROP, FORBID, SUSPEND, + * GETPASS and SET PASSWORD commands by services operators on other services operators. * * This directive is optional, but recommended. */ diff -urN anope-1.9-42e652c/modules/commands/ns_access.cpp anope-1.9-42e652c+ns/modules/commands/ns_access.cpp --- anope-1.9-42e652c/modules/commands/ns_access.cpp 2012-05-02 16:48:59.000000000 +0200 +++ anope-1.9-42e652c+ns/modules/commands/ns_access.cpp 2012-05-03 15:53:46.000000000 +0200 @@ -120,9 +120,9 @@ source.Reply(ACCESS_DENIED); return; } - else if (Config->NSSecureAdmins && u->Account() != na->nc && na->nc->IsServicesOper()) + else if (Config->NSSecureAdmins && u->Account() != na->nc && na->nc->IsServicesOper() && !cmd.equals_ci("LIST")) { - source.Reply(_("You may view or modify the access list of other services operators.")); + source.Reply(_("You may view but not modify the access list of other services operators.")); return; } diff -urN anope-1.9-42e652c/modules/commands/ns_release.cpp anope-1.9-42e652c+ns/modules/commands/ns_release.cpp --- anope-1.9-42e652c/modules/commands/ns_release.cpp 2012-05-02 16:48:59.000000000 +0200 +++ anope-1.9-42e652c+ns/modules/commands/ns_release.cpp 2012-05-08 02:50:38.000000000 +0200 @@ -45,9 +45,9 @@ if (MOD_RESULT == EVENT_ALLOW) { - Log(LOG_COMMAND, u, this) << "released " << na->nick; + Log(LOG_COMMAND, u, this) << "for nickname " << na->nick; na->Release(); - source.Reply(_("Services' hold on your nick has been released.")); + source.Reply(_("Services' hold on nickname \002%s\002 has been released."), nick.c_str()); } else { @@ -58,11 +58,15 @@ } else { - if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)) || + bool override = u->Account() != na->nc && u->HasPriv("nickserv/release"); + + if (override || u->Account() == na->nc || + (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)) || (!u->fingerprint.empty() && na->nc->FindCert(u->fingerprint))) { + Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this) << "for nickname " << na->nick; na->Release(); - source.Reply(_("Services' hold on your nick has been released.")); + source.Reply(_("Services' hold on nickname \002%s\002 has been released."), nick.c_str()); } else source.Reply(ACCESS_DENIED); |