mirror of
https://github.com/anope/anope.git
synced 2026-07-07 02:03:15 +02:00
dos2unix on files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2568 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+9
-9
@@ -445,9 +445,9 @@ enum UserModeName
|
||||
UMODE_BEGIN,
|
||||
|
||||
/* Usermodes */
|
||||
UMODE_SERV_ADMIN, UMODE_BOT, UMODE_CO_ADMIN, UMODE_FILTER, UMODE_HIDEOPER, UMODE_NETADMIN,
|
||||
UMODE_REGPRIV, UMODE_PROTECTED, UMODE_NO_CTCP, UMODE_WEBTV, UMODE_WHOIS, UMODE_ADMIN, UMODE_DEAF,
|
||||
UMODE_GLOBOPS, UMODE_HELPOP, UMODE_INVIS, UMODE_OPER, UMODE_PRIV, UMODE_GOD, UMODE_REGISTERED,
|
||||
UMODE_SERV_ADMIN, UMODE_BOT, UMODE_CO_ADMIN, UMODE_FILTER, UMODE_HIDEOPER, UMODE_NETADMIN,
|
||||
UMODE_REGPRIV, UMODE_PROTECTED, UMODE_NO_CTCP, UMODE_WEBTV, UMODE_WHOIS, UMODE_ADMIN, UMODE_DEAF,
|
||||
UMODE_GLOBOPS, UMODE_HELPOP, UMODE_INVIS, UMODE_OPER, UMODE_PRIV, UMODE_GOD, UMODE_REGISTERED,
|
||||
UMODE_SNOMASK, UMODE_VHOST, UMODE_WALLOPS, UMODE_CLOAK, UMODE_SSL, UMODE_CALLERID,
|
||||
|
||||
UMODE_END
|
||||
@@ -455,12 +455,12 @@ enum UserModeName
|
||||
|
||||
enum ChannelModeName
|
||||
{
|
||||
CMODE_BEGIN,
|
||||
|
||||
/* Channel modes */
|
||||
CMODE_BLOCKCOLOR, CMODE_FLOOD, CMODE_INVITE, CMODE_KEY, CMODE_LIMIT, CMODE_MODERATED, CMODE_NOEXTERNAL,
|
||||
CMODE_PRIVATE, CMODE_REGISTERED, CMODE_SECRET, CMODE_TOPIC, CMODE_AUDITORIUM, CMODE_SSL, CMODE_ADMINONLY,
|
||||
CMODE_NOCTCP, CMODE_FILTER, CMODE_NOKNOCK, CMODE_REDIRECT, CMODE_REGMODERATED, CMODE_NONICK, CMODE_OPERONLY,
|
||||
CMODE_BEGIN,
|
||||
|
||||
/* Channel modes */
|
||||
CMODE_BLOCKCOLOR, CMODE_FLOOD, CMODE_INVITE, CMODE_KEY, CMODE_LIMIT, CMODE_MODERATED, CMODE_NOEXTERNAL,
|
||||
CMODE_PRIVATE, CMODE_REGISTERED, CMODE_SECRET, CMODE_TOPIC, CMODE_AUDITORIUM, CMODE_SSL, CMODE_ADMINONLY,
|
||||
CMODE_NOCTCP, CMODE_FILTER, CMODE_NOKNOCK, CMODE_REDIRECT, CMODE_REGMODERATED, CMODE_NONICK, CMODE_OPERONLY,
|
||||
CMODE_NOKICK, CMODE_REGISTEREDONLY, CMODE_STRIPCOLOR, CMODE_NONOTICE, CMODE_NOINVITE, CMODE_ALLINVITE,
|
||||
CMODE_BLOCKCAPS, CMODE_PERM,
|
||||
|
||||
|
||||
+125
-125
@@ -191,43 +191,43 @@ bool ChannelModeRegistered::CanSet(User *u)
|
||||
* @param mask The ban
|
||||
*/
|
||||
void ChannelModeBan::AddMask(Channel *chan, const char *mask)
|
||||
{
|
||||
Entry *ban;
|
||||
|
||||
/* check for NULL values otherwise we will segfault */
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_ban called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new ban and add it to the list.. ~ Viper */
|
||||
if (!chan->bans)
|
||||
chan->bans = list_create();
|
||||
ban = entry_add(chan->bans, mask);
|
||||
|
||||
if (!ban)
|
||||
fatal("Creating new ban entry failed");
|
||||
|
||||
/* Check whether it matches a botserv bot after adding internally
|
||||
* and parsing it through cidr support. ~ Viper */
|
||||
if (s_BotServ && BSSmartJoin && chan->ci && chan->ci->bi
|
||||
&& chan->usercount >= BSMinUsers)
|
||||
{
|
||||
BotInfo *bi = chan->ci->bi;
|
||||
|
||||
if (entry_match(ban, bi->nick, bi->user, bi->host, 0))
|
||||
{
|
||||
ircdproto->SendMode(bi, chan->name, "-b %s", mask);
|
||||
entry_delete(chan->bans, ban);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("debug: Added ban %s to channel %s", mask, chan->name);
|
||||
{
|
||||
Entry *ban;
|
||||
|
||||
/* check for NULL values otherwise we will segfault */
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_ban called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new ban and add it to the list.. ~ Viper */
|
||||
if (!chan->bans)
|
||||
chan->bans = list_create();
|
||||
ban = entry_add(chan->bans, mask);
|
||||
|
||||
if (!ban)
|
||||
fatal("Creating new ban entry failed");
|
||||
|
||||
/* Check whether it matches a botserv bot after adding internally
|
||||
* and parsing it through cidr support. ~ Viper */
|
||||
if (s_BotServ && BSSmartJoin && chan->ci && chan->ci->bi
|
||||
&& chan->usercount >= BSMinUsers)
|
||||
{
|
||||
BotInfo *bi = chan->ci->bi;
|
||||
|
||||
if (entry_match(ban, bi->nick, bi->user, bi->host, 0))
|
||||
{
|
||||
ircdproto->SendMode(bi, chan->name, "-b %s", mask);
|
||||
entry_delete(chan->bans, ban);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("debug: Added ban %s to channel %s", mask, chan->name);
|
||||
}
|
||||
|
||||
/** Remove a ban from the channel
|
||||
@@ -236,26 +236,26 @@ void ChannelModeBan::AddMask(Channel *chan, const char *mask)
|
||||
*/
|
||||
void ChannelModeBan::DelMask(Channel *chan, const char *mask)
|
||||
{
|
||||
AutoKick *akick;
|
||||
Entry *ban;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -b without a mask */
|
||||
if (!mask || !chan->bans || (chan->bans->count == 0))
|
||||
return;
|
||||
|
||||
ban = elist_find_mask(chan->bans, mask);
|
||||
|
||||
if (ban)
|
||||
{
|
||||
entry_delete(chan->bans, ban);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted ban %s from channel %s", mask,
|
||||
chan->name);
|
||||
}
|
||||
|
||||
if (chan->ci && (akick = is_stuck(chan->ci, mask)))
|
||||
stick_mask(chan->ci, akick);
|
||||
AutoKick *akick;
|
||||
Entry *ban;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -b without a mask */
|
||||
if (!mask || !chan->bans || (chan->bans->count == 0))
|
||||
return;
|
||||
|
||||
ban = elist_find_mask(chan->bans, mask);
|
||||
|
||||
if (ban)
|
||||
{
|
||||
entry_delete(chan->bans, ban);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted ban %s from channel %s", mask,
|
||||
chan->name);
|
||||
}
|
||||
|
||||
if (chan->ci && (akick = is_stuck(chan->ci, mask)))
|
||||
stick_mask(chan->ci, akick);
|
||||
|
||||
}
|
||||
|
||||
@@ -265,25 +265,25 @@ void ChannelModeBan::DelMask(Channel *chan, const char *mask)
|
||||
*/
|
||||
void ChannelModeExcept::AddMask(Channel *chan, const char *mask)
|
||||
{
|
||||
Entry *exception;
|
||||
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_exception called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new exception and add it to the list.. ~ Viper */
|
||||
if (!chan->excepts)
|
||||
chan->excepts = list_create();
|
||||
exception = entry_add(chan->excepts, mask);
|
||||
|
||||
if (!exception)
|
||||
fatal("Creating new exception entry failed");
|
||||
|
||||
if (debug)
|
||||
Entry *exception;
|
||||
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_exception called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new exception and add it to the list.. ~ Viper */
|
||||
if (!chan->excepts)
|
||||
chan->excepts = list_create();
|
||||
exception = entry_add(chan->excepts, mask);
|
||||
|
||||
if (!exception)
|
||||
fatal("Creating new exception entry failed");
|
||||
|
||||
if (debug)
|
||||
alog("debug: Added except %s to channel %s", mask, chan->name);
|
||||
}
|
||||
|
||||
@@ -293,20 +293,20 @@ void ChannelModeExcept::AddMask(Channel *chan, const char *mask)
|
||||
*/
|
||||
void ChannelModeExcept::DelMask(Channel *chan, const char *mask)
|
||||
{
|
||||
Entry *exception;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -e without a mask */
|
||||
if (!mask || !chan->excepts || (chan->excepts->count == 0))
|
||||
return;
|
||||
|
||||
exception = elist_find_mask(chan->excepts, mask);
|
||||
|
||||
if (exception)
|
||||
{
|
||||
entry_delete(chan->excepts, exception);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted except %s to channel %s", mask, chan->name);
|
||||
Entry *exception;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -e without a mask */
|
||||
if (!mask || !chan->excepts || (chan->excepts->count == 0))
|
||||
return;
|
||||
|
||||
exception = elist_find_mask(chan->excepts, mask);
|
||||
|
||||
if (exception)
|
||||
{
|
||||
entry_delete(chan->excepts, exception);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted except %s to channel %s", mask, chan->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,26 +316,26 @@ void ChannelModeExcept::DelMask(Channel *chan, const char *mask)
|
||||
*/
|
||||
void ChannelModeInvite::AddMask(Channel *chan, const char *mask)
|
||||
{
|
||||
Entry *invite;
|
||||
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_invite called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new invite and add it to the list.. ~ Viper */
|
||||
if (!chan->invites)
|
||||
chan->invites = list_create();
|
||||
invite = entry_add(chan->invites, mask);
|
||||
|
||||
if (!invite)
|
||||
fatal("Creating new exception entry failed");
|
||||
|
||||
if (debug)
|
||||
alog("debug: Added invite %s to channel %s", mask, chan->name);
|
||||
Entry *invite;
|
||||
|
||||
if (!chan || !mask)
|
||||
{
|
||||
if (debug)
|
||||
alog("debug: add_invite called with NULL values");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the list already exists, if not create it.
|
||||
* Create a new invite and add it to the list.. ~ Viper */
|
||||
if (!chan->invites)
|
||||
chan->invites = list_create();
|
||||
invite = entry_add(chan->invites, mask);
|
||||
|
||||
if (!invite)
|
||||
fatal("Creating new exception entry failed");
|
||||
|
||||
if (debug)
|
||||
alog("debug: Added invite %s to channel %s", mask, chan->name);
|
||||
|
||||
}
|
||||
|
||||
@@ -345,20 +345,20 @@ void ChannelModeInvite::AddMask(Channel *chan, const char *mask)
|
||||
*/
|
||||
void ChannelModeInvite::DelMask(Channel *chan, const char *mask)
|
||||
{
|
||||
Entry *invite;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -I without a mask */
|
||||
if (!mask || !chan->invites || (chan->invites->count == 0))
|
||||
return;
|
||||
|
||||
invite = elist_find_mask(chan->invites, mask);
|
||||
|
||||
if (invite)
|
||||
{
|
||||
entry_delete(chan->invites, invite);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted invite %s to channel %s", mask,
|
||||
chan->name);
|
||||
Entry *invite;
|
||||
|
||||
/* Sanity check as it seems some IRCD will just send -I without a mask */
|
||||
if (!mask || !chan->invites || (chan->invites->count == 0))
|
||||
return;
|
||||
|
||||
invite = elist_find_mask(chan->invites, mask);
|
||||
|
||||
if (invite)
|
||||
{
|
||||
entry_delete(chan->invites, invite);
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted invite %s to channel %s", mask,
|
||||
chan->name);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -475,24 +475,24 @@ User *finduser(const char *nick)
|
||||
return user;
|
||||
}
|
||||
|
||||
/** Check if the user has a mode
|
||||
* @param Name Mode name
|
||||
* @return true or false
|
||||
/** Check if the user has a mode
|
||||
* @param Name Mode name
|
||||
* @return true or false
|
||||
*/
|
||||
const bool User::HasMode(UserModeName Name) const
|
||||
{
|
||||
return modes[(size_t)Name];
|
||||
}
|
||||
|
||||
/** Set a mode on the user
|
||||
* @param Name The mode name
|
||||
/** Set a mode on the user
|
||||
* @param Name The mode name
|
||||
*/
|
||||
void User::SetMode(UserModeName Name)
|
||||
{
|
||||
modes[(size_t)Name] = true;
|
||||
}
|
||||
|
||||
/* Set a mode on the user
|
||||
/* Set a mode on the user
|
||||
* @param ModeChar The mode char
|
||||
*/
|
||||
void User::SetMode(char ModeChar)
|
||||
@@ -505,16 +505,16 @@ void User::SetMode(char ModeChar)
|
||||
}
|
||||
}
|
||||
|
||||
/** Remove a mode from the user
|
||||
* @param Name The mode name
|
||||
/** Remove a mode from the user
|
||||
* @param Name The mode name
|
||||
*/
|
||||
void User::RemoveMode(UserModeName Name)
|
||||
{
|
||||
modes[(size_t)Name] = false;
|
||||
}
|
||||
|
||||
/** Remove a mode from the user
|
||||
* @param ModeChar The mode char
|
||||
/** Remove a mode from the user
|
||||
* @param ModeChar The mode char
|
||||
*/
|
||||
void User::RemoveMode(char ModeChar)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user