// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef HAVE_CONFIG_H
#include "config.h"
int level = Utils::get_level(cnx->bot, from->getAddress());
String result = "";
int length = 0;
- std::map<std::string, class userFunction*, std::less<std::string> >::iterator it;
- for (it = cnx->bot->userFunctions.begin(); it != cnx->bot->userFunctions.end(); ++it)
- if ((*it).second->minLevel <= level) {
- result = result + (*it).first + " ";
- length += (*it).first.length() + 1;
- if (length >= 256) {
- from->sendNotice(result);
- result = ""; length = 0;
- }
- }
+ std::map<std::string, class userFunction*,
+ std::less<std::string> >::iterator it;
+
+ for (it = cnx->bot->userFunctions.begin();
+ it != cnx->bot->userFunctions.end(); ++it)
+ {
+ if ((*it).second->minLevel <= level)
+ {
+ result = result + (*it).first + " ";
+ length += (*it).first.length() + 1;
+
+ if (length >= 256)
+ {
+ from->sendNotice(result);
+ result = ""; length = 0;
+ }
+ }
+ }
if (result != "")
from->sendNotice(result);
from->sendNotice("\002Use\002 HELP <command> \002for"
return;
}
- if (!Utils::valid_nickname_p(nick)) {
+ if (!Utils::valid_nickname_p (cnx->bot, nick)) {
from->sendNotice(String("\002") + nick +
" is not a valid nickname\002");
return;
String channel, String rest)
{
Message m = Commands::SetVersion(cnx->bot, rest);
+
if (m.getCode() < 0)
- from->sendNotice(m.getMessage());
+ {
+ Commands::Notice (cnx->bot, from->getNick (), m.getMessage());
+ }
}
void