From dc5039e994a9bcbc0a59591296a753659095fd5b Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 3 Feb 2015 18:42:35 -0500 Subject: Properly unescape xmlrpc --- docs/XMLRPC/XMLRPC | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/XMLRPC/XMLRPC b/docs/XMLRPC/XMLRPC index a183af097..95a18abc4 100644 --- a/docs/XMLRPC/XMLRPC +++ b/docs/XMLRPC/XMLRPC @@ -3,8 +3,8 @@ This allows external applications, such as websites, to execute remote procedure Currently there are 5 supported XMLRPC calls, provided by m_xmlrpc_main: -checkAuthetication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password - is correct for the account name, useful for making login pages on websites. +checkAuthentication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password + is correct for the account name, useful for making login pages on websites. command - Takes three parameters, a service name (BotServ, ChanServ, NickServ), a user name (whether online or not), and the command to execute. This will execute a the given command to Anope using the given service name. If the user given is online, the -- cgit From e5447a8024ce5d128d40d08fe5d194d91458b752 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 12 Mar 2015 13:43:21 -0400 Subject: Update Changes.conf and Changes --- docs/Changes | 23 +++++++++++++++++++++++ docs/Changes.conf | 5 +++++ 2 files changed, 28 insertions(+) (limited to 'docs') diff --git a/docs/Changes b/docs/Changes index 6280734c3..ea29a58db 100644 --- a/docs/Changes +++ b/docs/Changes @@ -1,3 +1,26 @@ +Anope Version 2.0.2 +------------------- +Fix keepmodes preventing the first user of a channel from being deopped +Fix SQlines that don't begin with # from matching channels +Made cs_clone behave like the help describes, copying many settings and lists by default +Allow cs_clone to clone levels, too +Update Hybrid protocol module for 8.2 +Fix not unescaping all characters sent over XMLRPC +Fix crash when os_mode is used to destroy channels, like when unsetting permanent channel mode from an empty channel +Allow users with topic change privilege to change the topic instead of requiring them to use ChanServ's topic command +Fix negatively locking param modes in default mlock +Change entrymsg to check for the SET privilege, not real founder +Allow configuring characters allowed in nicknames +Fix crash when non users register channels externally (like XMLRPC0 +Remove operserv/exception MOVE, it did not function correctly. Instead reorder the list by deleting/adding entries. +Allow flood ttb to be 0. +Enforce mlock when disabling defcon modes +Fix cs_mode not being able to apply mlock on register +Add log message when users send memos +Fix old collide timers from staying around after successful identify. Fixes being able to identify and logout and still being hit by the old timers. +Fix undefined behavior in cs_mode which usually crashes when clearing large list modes +Show all opertypes in operserv/info, even if no opers use them + Anope Version 2.0.1 ------------------- Fix access entries on accounts sometimes not updating when a user's display name changes diff --git a/docs/Changes.conf b/docs/Changes.conf index c4a5d8ff7..3b90d38e8 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -3,6 +3,11 @@ Anope Version 2.0.2 Add an operserv/oper/modify privilege, required to use oper add and oper del Add a chanserv/access/list privilege, which allow readonly access to ChanServ access and akick lists Changed m_dnsbl's result configuration to be more extensible +Add 'max' setting to cs_mode +Add 'nickchars' setting to networkinfo +Add 'botserv/fantasy', 'chanserv/access/list', and 'operserv/oper/modify' oper privileges +Fix 'emailchange_message' to include the proper email address +Set a default permission on operserv/defcon Anope Version 2.0.1 ------------------- -- cgit From 3d09748d1cd604f81ab6dd6953bc9788cfe99040 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 22 Mar 2015 10:26:26 -0400 Subject: Fix typo in Changes --- docs/Changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/Changes b/docs/Changes index ea29a58db..fae8b2da9 100644 --- a/docs/Changes +++ b/docs/Changes @@ -11,7 +11,7 @@ Allow users with topic change privilege to change the topic instead of requiring Fix negatively locking param modes in default mlock Change entrymsg to check for the SET privilege, not real founder Allow configuring characters allowed in nicknames -Fix crash when non users register channels externally (like XMLRPC0 +Fix crash when non users register channels externally (like XMLRPC) Remove operserv/exception MOVE, it did not function correctly. Instead reorder the list by deleting/adding entries. Allow flood ttb to be 0. Enforce mlock when disabling defcon modes -- cgit From a718223585cd54bf9a7e2fad9749dc5301a9002d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Apr 2015 23:27:44 +0200 Subject: Remove workaround that is no longer needed This workaround was required previously but breaks the code with the corrections to the XML-RPC response. --- docs/XMLRPC/xmlrpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index c469ab05a..ef5e9a00c 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -33,8 +33,8 @@ class AnopeXMLRPC $inbuf = file_get_contents($this->Host, false, $context); $response = xmlrpc_decode($inbuf); - if (isset($response[0])) - return $response[0]; + if (isset($response)) + return $response; return NULL; } -- cgit From dd8dd3b4a09543bd0ab8496580c971d6e614a926 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Apr 2015 23:28:41 +0200 Subject: Make xmlrpc.php comply with PSR-2 coding standard --- docs/XMLRPC/xmlrpc.php | 136 +++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 67 deletions(-) (limited to 'docs') diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index ef5e9a00c..90e7a09c3 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -8,83 +8,85 @@ class AnopeXMLRPC { - private $Host; + private $Host; - function __construct($Host) - { - $this->Host = $Host; - } + public function __construct($Host) + { + $this->Host = $Host; + } - /** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg: - * $this->RunXMLRPC("checkAuthentication", array("adam", "qwerty")); - * If successful returns back an array of useful information. - * - * Note that $params["id"] is reserved for query ID, you may set it to something if you wish. - * If you do, the same ID will be passed back with the reply from Anope. - */ - function RunXMLRPC($name, $params) - { - $xmlquery = xmlrpc_encode_request($name, $params); - $context = stream_context_create(array("http" => array( - "method" => "POST", - "header" => "Content-Type: text/xml", - "content" => $xmlquery))); + /** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg: + * $this->RunXMLRPC("checkAuthentication", array("adam", "qwerty")); + * If successful returns back an array of useful information. + * + * Note that $params["id"] is reserved for query ID, you may set it to something if you wish. + * If you do, the same ID will be passed back with the reply from Anope. + */ + public function RunXMLRPC($name, $params) + { + $xmlquery = xmlrpc_encode_request($name, $params); + $context = stream_context_create(array("http" => array( + "method" => "POST", + "header" => "Content-Type: text/xml", + "content" => $xmlquery))); - $inbuf = file_get_contents($this->Host, false, $context); - $response = xmlrpc_decode($inbuf); + $inbuf = file_get_contents($this->Host, false, $context); + $response = xmlrpc_decode($inbuf); - if (isset($response)) - return $response; - return NULL; - } + if (isset($response)) { + return $response; + } - /** Do Command on Service as User, eg: - * $anope->DoCommand("ChanServ", "Adam", "REGISTER #adam"); - * Returns an array of information regarding the command execution, if - * If 'online' is set to yes, then the reply to the command was sent to the user on IRC. - * If 'online' is set to no, then the reply to the command is in the array member 'return' - */ - function DoCommand($Service, $User, $Command) - { - return $this->RunXMLRPC("command", array($Service, $User, $Command)); - } + return null; + } - /** Check an account/nick name and password to see if they are valid - * Returns the account display name if valid - */ - function CheckAuthentication($Account, $Pass) - { - $ret = $this->RunXMLRPC("checkAuthentication", array($Account, $Pass)); + /** Do Command on Service as User, eg: + * $anope->DoCommand("ChanServ", "Adam", "REGISTER #adam"); + * Returns an array of information regarding the command execution, if + * If 'online' is set to yes, then the reply to the command was sent to the user on IRC. + * If 'online' is set to no, then the reply to the command is in the array member 'return' + */ + public function DoCommand($Service, $User, $Command) + { + return $this->RunXMLRPC("command", array($Service, $User, $Command)); + } - if ($ret && $ret["result"] == "Success") - return $ret["account"]; - return NULL; - } + /** Check an account/nick name and password to see if they are valid + * Returns the account display name if valid + */ + public function CheckAuthentication($Account, $Pass) + { + $ret = $this->RunXMLRPC("checkAuthentication", array($Account, $Pass)); - /* Returns an array of misc stats regarding Anope - */ - function DoStats() - { - return $this->RunXMLRPC("stats", NULL); - } + if ($ret && $ret["result"] == "Success") { + return $ret["account"]; + } - /* Look up data for a channel - * Returns an array containing channel information, or an array of size one - * (just containing the name) if the channel does not exist - */ - function DoChannel($Channel) - { - return $this->RunXMLRPC("channel", array($Channel)); - } + return null; + } - /* Like DoChannel(), but different. - */ - function DoUser($User) - { - return $this->RunXMLRPC("user", array($User)); - } + /* Returns an array of misc stats regarding Anope + */ + public function DoStats() + { + return $this->RunXMLRPC("stats", null); + } + + /* Look up data for a channel + * Returns an array containing channel information, or an array of size one + * (just containing the name) if the channel does not exist + */ + public function DoChannel($Channel) + { + return $this->RunXMLRPC("channel", array($Channel)); + } + + /* Like DoChannel(), but different. + */ + public function DoUser($User) + { + return $this->RunXMLRPC("user", array($User)); + } } $anopexmlrpc = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc"); - -?> -- cgit From 41f4c7dab66765e4e759559b97b4a37317a32090 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 4 Apr 2015 09:43:51 +0200 Subject: A variety of small improvements to xmlrpc.php Pretty simple stuff. * Better method names * Better DocBlocks * Lowercase variables --- docs/XMLRPC/xmlrpc.php | 99 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 31 deletions(-) (limited to 'docs') diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index 90e7a09c3..2b5645ca7 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -1,62 +1,88 @@ Host = $Host; + $this->host = $host; } - /** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg: - * $this->RunXMLRPC("checkAuthentication", array("adam", "qwerty")); + /** + * Run an XMLRPC command. Name should be a query name and params an array of parameters, eg: + * $this->raw("checkAuthentication", ["adam", "qwerty"]); * If successful returns back an array of useful information. * * Note that $params["id"] is reserved for query ID, you may set it to something if you wish. * If you do, the same ID will be passed back with the reply from Anope. + * + * @param $name + * @param $params + * @return array|null */ - public function RunXMLRPC($name, $params) + public function run($name, $params) { $xmlquery = xmlrpc_encode_request($name, $params); - $context = stream_context_create(array("http" => array( + $context = stream_context_create(["http" => [ "method" => "POST", "header" => "Content-Type: text/xml", - "content" => $xmlquery))); + "content" => $xmlquery]]); - $inbuf = file_get_contents($this->Host, false, $context); + $inbuf = file_get_contents($this->host, false, $context); $response = xmlrpc_decode($inbuf); - if (isset($response)) { + if ($response) { return $response; } return null; } - /** Do Command on Service as User, eg: - * $anope->DoCommand("ChanServ", "Adam", "REGISTER #adam"); + /** + * Do Command on Service as User, eg: + * $anope->command("ChanServ", "Adam", "REGISTER #adam"); * Returns an array of information regarding the command execution, if * If 'online' is set to yes, then the reply to the command was sent to the user on IRC. * If 'online' is set to no, then the reply to the command is in the array member 'return' + * + * @param $service + * @param $user + * @param $command + * @return array|null */ - public function DoCommand($Service, $User, $Command) + public function command($service, $user, $command) { - return $this->RunXMLRPC("command", array($Service, $User, $Command)); + return $this->run("command", [$service, $user, $command]); } - /** Check an account/nick name and password to see if they are valid + /** + * Check an account/nick name and password to see if they are valid * Returns the account display name if valid + * + * @param $account + * @param $pass + * @return string|null */ - public function CheckAuthentication($Account, $Pass) + public function auth($account, $pass) { - $ret = $this->RunXMLRPC("checkAuthentication", array($Account, $Pass)); + $ret = $this->run("checkAuthentication", [$account, $pass]); if ($ret && $ret["result"] == "Success") { return $ret["account"]; @@ -65,28 +91,39 @@ class AnopeXMLRPC return null; } - /* Returns an array of misc stats regarding Anope + /** + * Returns an array of misc stats regarding Anope + * + * @return array|null */ - public function DoStats() + public function stats() { - return $this->RunXMLRPC("stats", null); + return $this->run("stats", null); } - /* Look up data for a channel + /** + * Look up data for a channel * Returns an array containing channel information, or an array of size one * (just containing the name) if the channel does not exist + * + * @param $channel + * @return array|null */ - public function DoChannel($Channel) + public function channel($channel) { - return $this->RunXMLRPC("channel", array($Channel)); + return $this->run("channel", [$channel]); } - /* Like DoChannel(), but different. + /** + * Like channel(), but different. + * + * @param $user + * @return array|null */ - public function DoUser($User) + public function user($user) { - return $this->RunXMLRPC("user", array($User)); + return $this->run("user", [$user]); } } -$anopexmlrpc = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc"); +$anope = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc"); -- cgit From 510a746f8d7cd373bfae4efc98a1ef9b13f2b4e9 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Jun 2015 09:37:09 -0400 Subject: Add ns_identify:maxlogins to limit the max number of concurrent logins per account --- docs/Changes.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/Changes.conf b/docs/Changes.conf index 3b90d38e8..5e813b3e4 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,3 +1,7 @@ +Anope Version 2.0.3-git +------------------- +Add ns_identify:maxlogins to limit the max number of concurrent logins per account + Anope Version 2.0.2 ------------------- Add an operserv/oper/modify privilege, required to use oper add and oper del -- cgit From 1666b1a8d8d629fd4ea89b083863dc217154eee9 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 8 Jul 2015 10:55:44 +0100 Subject: Fix a ton of typos. --- docs/C++CASTING | 4 ++-- docs/CODING | 2 +- docs/Changes | 4 ++-- docs/REDIS | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/C++CASTING b/docs/C++CASTING index bae24a24c..e1beb8f06 100644 --- a/docs/C++CASTING +++ b/docs/C++CASTING @@ -21,7 +21,7 @@ The syntax is usually *_cast(var). static_cast ----------- -From my expierence, this cast is closest to C-style casting for non-pointer +From my experience, this cast is closest to C-style casting for non-pointer types as well as between some (but not all) pointer types. This type of cast, like C-style casting, is performed at compile-time. static_cast can also do a downcast of a derived class to a base class, but only if the base class is @@ -80,7 +80,7 @@ Bad_cast exception. Note that in Anope we prefer if Anope::debug_cast is used. This uses dynamic_cast (and checks for a NULL pointer return) on debug builds -and static_cast on release builds, to speed up the program beacuse of dynamic_cast's +and static_cast on release builds, to speed up the program because of dynamic_cast's reliance on RTTI. reinterpret_cast diff --git a/docs/CODING b/docs/CODING index d08792869..7dbd5afb3 100644 --- a/docs/CODING +++ b/docs/CODING @@ -1,4 +1,4 @@ -Orginally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines +Originally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines --- diff --git a/docs/Changes b/docs/Changes index fae8b2da9..62242d7c0 100644 --- a/docs/Changes +++ b/docs/Changes @@ -173,8 +173,8 @@ A Added ns_resetpass module to the core A CS ACCESS VIEW which shows who added the access and last time used A Last used time to CS AKICK VIEW A Added a sha_256 encryption module -A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between diferent encryptions -A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dieing +A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between different encryptions +A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dying A Added support for linking with IPv6 F Unban command to accept an optional nick arg F Some typos in services.conf diff --git a/docs/REDIS b/docs/REDIS index 375d9b4a2..54358d16f 100644 --- a/docs/REDIS +++ b/docs/REDIS @@ -152,7 +152,7 @@ Table of Contents HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Services for IRC Networks" Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example. - If you are watching your services logs you will immediatly see: + If you are watching your services logs you will immediately see: USERS: redis!redis@services.anope.org (Services for IRC Networks) connected to the network (services.anope.org) -- cgit From f52bbe22af725f8e0fcfd27107bead60082938df Mon Sep 17 00:00:00 2001 From: Robby Date: Fri, 18 Sep 2015 05:38:44 +0200 Subject: Update my email address. --- docs/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/README b/docs/README index ff7ecc242..ef84dfb02 100644 --- a/docs/README +++ b/docs/README @@ -107,7 +107,7 @@ Table of Contents Anope Translations: - * Robby (nl_NL) + * Robby (nl_NL) * Kein (ru_RU) * Maik Funke (de_DE) * Isaac Fontal (es_ES) -- cgit