From 6ca09be66341fd9f568fb0ac754df4f4c561bc1f Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Sep 2010 17:02:36 -0400 Subject: Cleaned up some unused code, moved handling of user modes around so we dont get log messages about user modes when users connect, and fixed tracking some umodes on Unreal --- include/channels.h | 17 ----------------- include/extern.h | 4 +--- include/services.h | 1 - include/users.h | 20 ++++++-------------- 4 files changed, 7 insertions(+), 35 deletions(-) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index d82e61037..41b252165 100644 --- a/include/channels.h +++ b/include/channels.h @@ -188,15 +188,6 @@ class CoreExport Channel : public Extensible, public Flags */ void SetMode(BotInfo *bi, ChannelModeName Name, const Anope::string ¶m = "", bool EnforceMLock = true); - /** - * Set a mode on a channel - * @param bi The client setting the modes - * @param Mode The mode - * @param param Optional param arg for the mode - * @param EnforceMLock true if mlocks should be enforced, false to override mlock - */ - void SetMode(BotInfo *bi, char Mode, const Anope::string ¶m = "", bool EnforceMLock = true); - /** Remove a mode from a channel * @param bi The client setting the modes * @param cm The mode @@ -213,14 +204,6 @@ class CoreExport Channel : public Extensible, public Flags * @param EnforceMLock true if mlocks should be enforced, false to override mlock */ void RemoveMode(BotInfo *bi, ChannelModeName Name, const Anope::string ¶m = "", bool EnforceMLock = true); - /** - * Remove a mode from a channel - * @param bi The client setting the modes - * @param Mode The mode - * @param param Optional param arg for the mode - * @param EnforceMLock true if mlocks should be enforced, false to override mlock - */ - void RemoveMode(BotInfo *bi, char Mode, const Anope::string ¶m = "", bool EnforceMLock = true); /** Clear all the modes from the channel * @param bi The client unsetting the modes diff --git a/include/extern.h b/include/extern.h index 95a70657a..249ac6dfb 100644 --- a/include/extern.h +++ b/include/extern.h @@ -347,7 +347,7 @@ E User *finduser(const Anope::string &nick); E Anope::string TS6SID; -E User *do_nick(const Anope::string &source, const Anope::string &nick, const Anope::string &username, const Anope::string &host, const Anope::string &server, const Anope::string &realname, time_t ts, const Anope::string &ip, const Anope::string &vhost, const Anope::string &uid); +E User *do_nick(const Anope::string &source, const Anope::string &nick, const Anope::string &username, const Anope::string &host, const Anope::string &server, const Anope::string &realname, time_t ts, const Anope::string &ip, const Anope::string &vhost, const Anope::string &uid, const Anope::string &modes); E void do_umode(const Anope::string &source, int ac, const char **av); E void do_quit(const Anope::string &source, int ac, const char **av); @@ -361,8 +361,6 @@ E bool is_excepted_mask(ChannelInfo *ci, const Anope::string &mask); E bool match_usermask(const Anope::string &mask, User *user); E Anope::string create_mask(User *u); -E void UserSetInternalModes(User *user, int ac, const char **av); - /******************************************************************************/ E void b64_encode(const Anope::string &src, Anope::string &target); diff --git a/include/services.h b/include/services.h index 8748bd290..95542c267 100644 --- a/include/services.h +++ b/include/services.h @@ -433,7 +433,6 @@ struct IRCDVar int tsonmode; /* Timestamp on mode changes */ int omode; /* On the fly o:lines */ int umode; /* change user modes */ - int nickvhost; /* Users vhost sent during NICK */ int knock_needs_i; /* Check if we needed +i when setting NOKNOCK */ int svsmode_ucmode; /* Can remove User Channel Modes with SVSMODE */ int sglineenforce; diff --git a/include/users.h b/include/users.h index 82ca59681..5abf6bbca 100644 --- a/include/users.h +++ b/include/users.h @@ -233,13 +233,6 @@ class CoreExport User : public Extensible */ void SetMode(BotInfo *bi, UserModeName Name, const Anope::string &Param = ""); - /* Set a mode on the user - * @param bi The client setting the mode - * @param ModeChar The mode char - * @param param Optional param for the mode - */ - void SetMode(BotInfo *bi, char ModeChar, const Anope::string &Param = ""); - /** Remove a mode on the user * @param bi The client setting the mode * @param um The user mode @@ -252,18 +245,17 @@ class CoreExport User : public Extensible */ void RemoveMode(BotInfo *bi, UserModeName Name); - /** Remove a mode from the user - * @param bi The client setting the mode - * @param ModeChar The mode char - */ - void RemoveMode(BotInfo *bi, char ModeChar); - /** Set a string of modes on a user - * @param bi The client setting the mode + * @param bi The client setting the modes * @param umodes The modes */ void SetModes(BotInfo *bi, const char *umodes, ...); + /** Set a string of modes on a user internally + * @param umodes The modes + */ + void SetModesInternal(const char *umodes, ...); + /** Find the channel container for Channel c that the user is on * This is preferred over using FindUser in Channel, as there are usually more users in a channel * than channels a user is in -- cgit