mirror of
https://github.com/anope/anope.git
synced 2026-07-08 17:23:12 +02:00
BUILD : 1.7.5 (327) BUGS : none NOTES : Merged anope-capab into main trunk...
git-svn-id: svn://svn.anope.org/anope/trunk@327 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@203 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
26ea4bc11b
commit
61a23cd017
@@ -1,3 +1,10 @@
|
||||
Anope Version S V N
|
||||
-------------------
|
||||
Provided by Anope Dev. <dev@anope.org> - 2004
|
||||
|
||||
Provided by Trystan <trystan@nomadirc.net> - 2004
|
||||
08/23 A New protocol independent design (aka anope-capab). [ #00]
|
||||
|
||||
Anope Version 1.7.5
|
||||
-------------------
|
||||
Provided by Anope Dev. <dev@anope.org> - 2004
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Anope Version S V N
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.5
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Anope Version S V N
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.5
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
@@ -214,13 +214,15 @@ ok=0
|
||||
echo "Select the closest to the type of server on your IRC network:"
|
||||
echo " 1) DreamForge 4.6.7 [dated IRCd, upgrade to a current one]"
|
||||
echo " 2) Bahamut 1.4.27 [or later]"
|
||||
echo " 3) UnrealIRCd 3.1.1 [or later]"
|
||||
echo " 3) UnrealIRCd 3.1.1 [or later (not 3.2)]"
|
||||
echo " 4) UltimateIRCd 2.8.2 [or later]"
|
||||
echo " 5) UltimateIRCd 3.0.0 [alpha26 or later]"
|
||||
echo " 6) Hybrid IRCd 7.0 [experimental]"
|
||||
echo " 7) ViagraIRCd 1.3.x [or later]"
|
||||
echo " 8) PTlink 6.15.0 [experimental]"
|
||||
echo " 9) RageIRCd 2.0 [beta-3 or later]"
|
||||
echo " 10) Unreal 3.2 [Unreal 3.2 beta19 or later]"
|
||||
|
||||
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$IRCTYPE] "
|
||||
@@ -242,7 +244,7 @@ while [ $ok -eq 0 ] ; do
|
||||
ok=1;
|
||||
;;
|
||||
3)
|
||||
IRCTYPE_DEF="IRC_UNREAL"
|
||||
IRCTYPE_DEF="IRC_UNREAL31"
|
||||
ok=1;
|
||||
;;
|
||||
4)
|
||||
@@ -270,6 +272,12 @@ while [ $ok -eq 0 ] ; do
|
||||
ok=1;
|
||||
;;
|
||||
|
||||
10)
|
||||
IRCTYPE_DEF="IRC_UNREAL32"
|
||||
ok=1;
|
||||
;;
|
||||
|
||||
|
||||
*)
|
||||
echo "Please enter a valid option number."
|
||||
;;
|
||||
|
||||
@@ -1289,23 +1289,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test $# = 0; then
|
||||
echo "You might want to run ./Config or provide some parameters to this script."
|
||||
echo "./configure --help for information about this script"
|
||||
@@ -2888,8 +2871,6 @@ _ACEOF
|
||||
|
||||
MYSQL=" mysql.c "
|
||||
RDB=" rdb.c "
|
||||
|
||||
|
||||
x="1";
|
||||
|
||||
|
||||
@@ -8365,35 +8346,20 @@ cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_BAHAMUT 1
|
||||
_ACEOF
|
||||
|
||||
elif test "$withval" = "IRC_UNREAL"; then
|
||||
elif test "$withval" = "IRC_UNREAL31"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_DREAMFORGE 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_UNREAL 1
|
||||
#define IRC_UNREAL31 1
|
||||
_ACEOF
|
||||
|
||||
elif test "$withval" = "IRC_ULTIMATE"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_DREAMFORGE 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_ULTIMATE 1
|
||||
#define IRC_ULTIMATE2 1
|
||||
_ACEOF
|
||||
|
||||
elif test "$withval" = "IRC_ULTIMATE3"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_BAHAMUT 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_ULTIMATE3 1
|
||||
_ACEOF
|
||||
@@ -8406,11 +8372,6 @@ _ACEOF
|
||||
|
||||
elif test "$withval" = "IRC_VIAGRA"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_BAHAMUT 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_VIAGRA 1
|
||||
_ACEOF
|
||||
@@ -8424,12 +8385,13 @@ _ACEOF
|
||||
elif test "$withval" = "IRC_RAGE2"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_BAHAMUT 1
|
||||
#define IRC_RAGE2 1
|
||||
_ACEOF
|
||||
|
||||
elif test "$withval" = "IRC_UNREAL32"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define IRC_RAGE2 1
|
||||
#define IRC_UNREAL32 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Bahamut functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef IRC_BAHAMUT
|
||||
|
||||
#define PROTECT_SET_MODE "+"
|
||||
#define PROTECT_UNSET_MODE "+"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_R 0x80000000
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_c 0x00000400 /* Colors can't be used */
|
||||
#define CMODE_M 0x00000800 /* Non-regged nicks can't send messages */
|
||||
#define CMODE_O 0x00008000 /* Only opers can join */
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
+9
-9
@@ -20,15 +20,15 @@
|
||||
* terminated with a NULL name.
|
||||
*/
|
||||
|
||||
extern Command *lookup_cmd(Command *list, const char *name);
|
||||
extern void run_cmd(const char *service, User *u, Command *list,
|
||||
const char *name);
|
||||
extern void help_cmd(const char *service, User *u, Command *list,
|
||||
const char *name);
|
||||
extern void do_run_cmd(const char *service, User * u, Command *c,const char *cmd);
|
||||
extern void do_help_cmd(const char *service, User * u, Command *c,const char *cmd);
|
||||
extern void mod_help_cmd(const char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
extern void mod_run_cmd(const char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
extern Command *lookup_cmd(Command *list, char *name);
|
||||
extern void run_cmd(char *service, User *u, Command *list,
|
||||
char *name);
|
||||
extern void help_cmd(char *service, User *u, Command *list,
|
||||
char *name);
|
||||
extern void do_run_cmd(char *service, User * u, Command *c,const char *cmd);
|
||||
extern void do_help_cmd(char *service, User * u, Command *c,const char *cmd);
|
||||
extern void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
extern void mod_run_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
|
||||
extern char *mod_current_module_name;
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* DreamForge IRCD functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_DREAMFORGE
|
||||
|
||||
#define OWNER_SET_MODE "+"
|
||||
#define OWNER_UNSET_MODE "+"
|
||||
#define PROTECT_SET_MODE "+"
|
||||
#define PROTECT_UNSET_MODE "+"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_g 0x80000000
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
+217
-101
@@ -19,23 +19,24 @@
|
||||
|
||||
#define E extern
|
||||
|
||||
E char *uplink;
|
||||
|
||||
/**** modules.c ****/
|
||||
E void moduleCallBackRun(void);
|
||||
E void moduleCleanStruct(ModuleData * moduleData[]);
|
||||
/* IRC Variables */
|
||||
E IRCDVar ircd[];
|
||||
E IRCDCAPAB ircdcap[];
|
||||
|
||||
/**** actions.c ****/
|
||||
|
||||
E void change_user_mode(User * u, char *modes, char *arg);
|
||||
E void kill_user(const char *source, const char *user, const char *reason);
|
||||
E void kill_user(char *source, char *user, char *reason);
|
||||
E void bad_password(User * u);
|
||||
E void sqline(char *mask, char *reason);
|
||||
E void common_unban(ChannelInfo * ci, char *nick);
|
||||
E void common_svsmode(User * u, char *modes, char *arg);
|
||||
|
||||
/**** botserv.c ****/
|
||||
|
||||
E BotInfo *botlists[256];
|
||||
|
||||
E void get_botserv_stats(long *nrec, long *memuse);
|
||||
|
||||
E void bs_init(void);
|
||||
E void botserv(User *u, char *buf);
|
||||
E void botmsgs(User *u, BotInfo *bi, char *buf);
|
||||
@@ -43,7 +44,6 @@ E void botchanmsgs(User *u, ChannelInfo *ci, char *buf);
|
||||
E void load_bs_dbase(void);
|
||||
E void save_bs_dbase(void);
|
||||
E void save_bs_rdb_dbase(void);
|
||||
|
||||
E BotInfo *makebot(char *nick);
|
||||
E BotInfo *findbot(char *nick);
|
||||
E void bot_join(ChannelInfo *ci);
|
||||
@@ -54,6 +54,30 @@ E void bot_rejoin_all(BotInfo *bi);
|
||||
E Channel *chanlist[1024];
|
||||
E CBMode cbmodes[128];
|
||||
E CBModeInfo cbmodeinfos[];
|
||||
E CUMode cumodes[128];
|
||||
E CMMode cmmodes[128];
|
||||
E unsigned long umodes[128];
|
||||
E char csmodes[128];
|
||||
|
||||
extern void do_mass_mode(char *modes);
|
||||
extern void add_ban(Channel * chan, char *mask);
|
||||
extern void chan_adduser2(User * user, Channel * c);
|
||||
extern void chan_delete(Channel * c);
|
||||
extern void del_ban(Channel * chan, char *mask);
|
||||
extern void set_key(Channel * chan, char *value);
|
||||
extern void set_limit(Channel * chan, char *value);
|
||||
extern char *get_key(Channel * chan);
|
||||
extern char *get_limit(Channel * chan);
|
||||
extern Channel *chan_create(char *chan);
|
||||
extern Channel *join_user_update(User * user, Channel * chan, char *name);
|
||||
|
||||
extern void add_exception(Channel * chan, char *mask);
|
||||
extern void del_exception(Channel * chan, char *mask);
|
||||
extern char *get_flood(Channel * chan);
|
||||
extern void set_flood(Channel * chan, char *value);
|
||||
extern char *get_redirect(Channel * chan);
|
||||
extern void set_redirect(Channel * chan, char *value);
|
||||
|
||||
|
||||
E void get_channel_stats(long *nrec, long *memuse);
|
||||
E Channel *findchan(const char *chan);
|
||||
@@ -84,6 +108,7 @@ E void do_part(const char *source, int ac, char **av);
|
||||
E void do_sjoin(const char *source, int ac, char **av);
|
||||
E void do_topic(const char *source, int ac, char **av);
|
||||
E void do_mass_mode(char *modes);
|
||||
|
||||
#define whosends(ci) ((!(ci) || !((ci)->botflags & BS_SYMBIOSIS) || !(ci)->bi || !(ci)->c || (ci)->c->usercount < BSMinUsers) ? s_ChanServ : (ci)->bi->nick)
|
||||
|
||||
/**** chanserv.c ****/
|
||||
@@ -107,25 +132,16 @@ E void cs_remove_nick(const NickCore * nc);
|
||||
E void cs_remove_bot(const BotInfo * bi);
|
||||
|
||||
E void check_modes(Channel * c);
|
||||
#if defined(IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
E int check_valid_admin(User * user, Channel * chan, int servermode);
|
||||
#endif
|
||||
E int check_valid_op(User * user, Channel * chan, int servermode);
|
||||
E int check_should_op(User * user, const char *chan);
|
||||
E int check_should_voice(User * user, const char *chan);
|
||||
#ifdef HAS_HALFOP
|
||||
E int check_should_halfop(User * user, const char *chan);
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
E int check_should_owner(User * user, const char *chan);
|
||||
E int check_should_protect(User * user, const char *chan);
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE3) || defined(IRC_RAGE2) || defined(IRC_PTLINK)
|
||||
E int check_should_protect(User * user, const char *chan);
|
||||
#endif
|
||||
E int check_should_op(User * user, char *chan);
|
||||
E int check_should_voice(User * user, char *chan);
|
||||
E int check_should_halfop(User * user, char *chan);
|
||||
E int check_should_owner(User * user, char *chan);
|
||||
E int check_should_protect(User * user, char *chan);
|
||||
E int check_kick(User * user, char *chan);
|
||||
E void record_topic(const char *chan);
|
||||
E void restore_topic(const char *chan);
|
||||
E void restore_topic(char *chan);
|
||||
E int check_topiclock(Channel * c, time_t topic_time);
|
||||
|
||||
E ChannelInfo *cs_findchan(const char *chan);
|
||||
@@ -138,19 +154,14 @@ E int get_idealban(ChannelInfo * ci, User * u, char *ret, int retlen);
|
||||
E AutoKick *is_stuck(ChannelInfo * ci, char *mask);
|
||||
E void stick_mask(ChannelInfo * ci, AutoKick * akick);
|
||||
E void stick_all(ChannelInfo * ci);
|
||||
|
||||
#ifdef HAS_FMODE
|
||||
E char *cs_get_flood(ChannelInfo * ci);
|
||||
E void cs_set_flood(ChannelInfo * ci, char *value);
|
||||
#endif
|
||||
E char *cs_get_key(ChannelInfo * ci);
|
||||
E void cs_set_key(ChannelInfo * ci, char *value);
|
||||
E char *cs_get_limit(ChannelInfo * ci);
|
||||
E void cs_set_limit(ChannelInfo * ci, char *value);
|
||||
#ifdef HAS_LMODE
|
||||
E char *cs_get_redirect(ChannelInfo * ci);
|
||||
E void cs_set_redirect(ChannelInfo * ci, char *value);
|
||||
#endif
|
||||
|
||||
/**** compat.c ****/
|
||||
|
||||
@@ -482,10 +493,20 @@ E char *DefconMessage;
|
||||
E char *DefConAkillReason;
|
||||
E char *DefConOffMessage;
|
||||
|
||||
E int Numeric;
|
||||
|
||||
/**** converter.c ****/
|
||||
|
||||
E int convert_ircservices_44(void);
|
||||
|
||||
/**** helpserv.c ****/
|
||||
E void helpserv(User * u, char *buf);
|
||||
E void helpserv_init(void);
|
||||
|
||||
/**** hostserv.c ****/
|
||||
E void hostserv_init(void);
|
||||
E void addHostCore(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time);
|
||||
|
||||
/**** init.c ****/
|
||||
|
||||
E void introduce_user(const char *user);
|
||||
@@ -505,7 +526,7 @@ E void lang_init(void);
|
||||
(langtexts[((nc)?((NickCore*)nc)->language:NSDefLanguage)][(index)])
|
||||
E int strftime_lang(char *buf, int size, User * u, int format,
|
||||
struct tm *tm);
|
||||
E void syntax_error(const char *service, User * u, const char *command,
|
||||
E void syntax_error(char *service, User * u, char *command,
|
||||
int msgnum);
|
||||
|
||||
|
||||
@@ -555,7 +576,6 @@ E int do_mysql;
|
||||
#endif
|
||||
|
||||
E int is44;
|
||||
|
||||
E int quitting;
|
||||
E int delayed_quit;
|
||||
E char *quitmsg;
|
||||
@@ -581,18 +601,28 @@ E void ms_init(void);
|
||||
E void memoserv(User * u, char *buf);
|
||||
E void check_memos(User * u);
|
||||
|
||||
/**** messages.c ****/
|
||||
|
||||
E int m_nickcoll(char *user);
|
||||
E int m_away(char *source, char *msg);
|
||||
E int m_kill(char *nick, char *msg);
|
||||
E int m_motd(char *source);
|
||||
E int m_privmsg(char *source, char *receiver, char *msg);
|
||||
E int m_stats(char *source, int ac, char **av);
|
||||
E int m_whois(char *source, char *who);
|
||||
E int m_time(char *source, int ac, char **av);
|
||||
E int m_version(char *source, int ac, char **av);
|
||||
|
||||
|
||||
/**** misc.c ****/
|
||||
|
||||
|
||||
E char *strscpy(char *d, const char *s, size_t len);
|
||||
E char *stristr(char *s1, char *s2);
|
||||
E char *strnrepl(char *s, int32 size, const char *old, const char *new);
|
||||
|
||||
E char *merge_args(int argc, char **argv);
|
||||
|
||||
E int match_wild(const char *pattern, const char *str);
|
||||
E int match_wild_nocase(const char *pattern, const char *str);
|
||||
|
||||
E int dotime(const char *s);
|
||||
E char *duration(NickAlias * na, char *buf, int bufsize, time_t seconds);
|
||||
E char *expire_left(NickAlias * na, char *buf, int len, time_t expires);
|
||||
@@ -615,11 +645,18 @@ E void EnforceQlinedNick(char *nick, char *killer);
|
||||
E int nickIsServices(char *nick);
|
||||
|
||||
|
||||
E const char* inttobase64(char* buf, unsigned int v, unsigned int count);
|
||||
E unsigned int base64toIP(const char* s);
|
||||
E unsigned int base64toint(const char* s);
|
||||
|
||||
/**** modules.c ****/
|
||||
E void moduleCallBackRun(void);
|
||||
E void moduleCleanStruct(ModuleData * moduleData[]);
|
||||
|
||||
/**** news.c ****/
|
||||
|
||||
E int32 nnews, news_size;
|
||||
E NewsItem *news;
|
||||
|
||||
E void get_news_stats(long *nrec, long *memuse);
|
||||
E void load_news(void);
|
||||
E void save_news(void);
|
||||
@@ -629,15 +666,12 @@ E int do_logonnews(User * u);
|
||||
E int do_opernews(User * u);
|
||||
E int do_randomnews(User * u);
|
||||
|
||||
|
||||
/**** nickserv.c ****/
|
||||
|
||||
E NickAlias *nalists[1024];
|
||||
E NickCore *nclists[1024];
|
||||
E NickRequest *nrlists[1024];
|
||||
|
||||
E unsigned int guestnum;
|
||||
|
||||
E void insert_requestnick(NickRequest * nr);
|
||||
E void alpha_insert_alias(NickAlias * na);
|
||||
E void insert_core(NickCore * nc);
|
||||
@@ -660,23 +694,14 @@ E int nick_recognized(User * u);
|
||||
E void expire_nicks(void);
|
||||
E void expire_requests(void);
|
||||
E int ns_do_register(User * u);
|
||||
|
||||
E int delnick(NickAlias * na);
|
||||
E NickAlias *findnick(const char *nick);
|
||||
E NickCore *findcore(const char *nick);
|
||||
E void clean_ns_timeouts(NickAlias * na);
|
||||
|
||||
E void nsStartNickTracking(User * u);
|
||||
E void nsStopNickTracking(User * u);
|
||||
E int nsCheckNickTracking(User *u);
|
||||
|
||||
/**** helpserv.c ****/
|
||||
E void helpserv(User * u, char *buf);
|
||||
E void helpserv_init(void);
|
||||
|
||||
/**** hostserv.c ****/
|
||||
E void hostserv_init(void);
|
||||
E void addHostCore(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time);
|
||||
|
||||
/**** operserv.c ****/
|
||||
|
||||
@@ -699,32 +724,28 @@ E int nick_is_services_admin(NickCore *nc);
|
||||
E int nick_is_services_oper(NickCore *nc);
|
||||
|
||||
E int add_akill(User *u, char *mask, const char *by, const time_t expires, const char *reason);
|
||||
E int check_akill(const char *nick, const char *username, const char *host, const char *vhost, const char *ip);
|
||||
E int check_akill(char *nick, const char *username, const char *host, const char *vhost, const char *ip);
|
||||
E void expire_akills(void);
|
||||
E void oper_global(char *nick, char *fmt, ...);
|
||||
#ifdef IRC_BAHAMUT
|
||||
|
||||
E int add_sgline(User *u, char *mask, const char *by, const time_t expires, const char *reason);
|
||||
E int check_sgline(const char *nick, const char *realname);
|
||||
E int check_sgline(char *nick, const char *realname);
|
||||
E void expire_sglines(void);
|
||||
#endif
|
||||
|
||||
E int add_sqline(User *u, char *mask, const char *by, const time_t expires, const char *reason);
|
||||
E int check_sqline(const char *nick, int nick_change);
|
||||
#ifdef IRC_BAHAMUT
|
||||
E int check_chan_sqline(const char *chan);
|
||||
#endif
|
||||
E int check_sqline(char *nick, int nick_change);
|
||||
E void expire_sqlines(void);
|
||||
E int check_chan_sqline(const char *chan);
|
||||
|
||||
#ifdef IRC_BAHAMUT
|
||||
E int add_szline(User * u, char *mask, const char *by,
|
||||
const time_t expires, const char *reason);
|
||||
E void expire_szlines(void);
|
||||
#endif
|
||||
|
||||
E void check_clones(User * user);
|
||||
|
||||
E void delete_ignore(const char *nick);
|
||||
|
||||
E Server *server_global(Server * s, char *msg);
|
||||
|
||||
/**** process.c ****/
|
||||
|
||||
E int allow_ignore;
|
||||
@@ -736,19 +757,6 @@ E IgnoreData *get_ignore(const char *nick);
|
||||
E int split_buf(char *buf, char ***argv, int colon_special);
|
||||
E void process(void);
|
||||
|
||||
/**** protocol.c ****/
|
||||
|
||||
E void s_akill(char *user, char *host, char *who, time_t when,
|
||||
time_t expires, char *reason);
|
||||
E void s_rakill(char *user, char *host);
|
||||
E void s_sgline(char *mask, char *reason);
|
||||
E void s_sqline(char *mask, char *reason);
|
||||
E void s_svsnoop(char *server, int set);
|
||||
E void s_szline(char *mask, char *reason);
|
||||
E void s_unsgline(char *mask);
|
||||
E void s_unsqline(char *mask);
|
||||
E void s_unszline(char *mask);
|
||||
|
||||
/**** proxy.c ****/
|
||||
|
||||
E HostCache *hcache[1024];
|
||||
@@ -769,44 +777,33 @@ E void send_cmd(const char *source, const char *fmt, ...)
|
||||
E void vsend_cmd(const char *source, const char *fmt, va_list args)
|
||||
FORMAT(printf,2,0);
|
||||
|
||||
E void wallops(const char *source, const char *fmt, ...)
|
||||
FORMAT(printf,2,3);
|
||||
|
||||
E void notice(const char *source, const char *dest, const char *fmt, ...)
|
||||
E void notice_server(char *source, Server * s, char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
E void notice_server(const char *source, Server *s, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
E void notice_user(const char *source, User *u, const char *fmt, ...)
|
||||
E void notice_user(char *source, User *u, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void notice_list(const char *source, const char *dest, const char **text);
|
||||
E void notice_lang(const char *source, User *dest, int message, ...);
|
||||
E void notice_help(const char *source, User *dest, int message, ...);
|
||||
E void notice_list(char *source, char *dest, char **text);
|
||||
E void notice_lang(char *source, User *dest, int message, ...);
|
||||
E void notice_help(char *source, User *dest, int message, ...);
|
||||
|
||||
E void privmsg(const char *source, const char *dest, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void send_mode(const char *source, const char *on, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
/**** servers.c ****/
|
||||
|
||||
E Server *servlist;
|
||||
E Server *me_server;
|
||||
#ifdef IRC_BAHAMUT
|
||||
E uint16 uplink_capab;
|
||||
#endif
|
||||
E uint32 uplink_capab;
|
||||
|
||||
E Server *first_server(int flags);
|
||||
E Server *next_server(int flags);
|
||||
|
||||
E Server *new_server(Server *uplink, const char *name, const char *desc,
|
||||
uint16 flags);
|
||||
E Server *new_server(Server * uplink, const char *name, const char *desc,
|
||||
uint16 flags);
|
||||
|
||||
E Server *findserver(Server *s, const char *name);
|
||||
|
||||
E void do_server(const char *source, int ac, char **av);
|
||||
E void do_squit(const char *source, int ac, char **av);
|
||||
E void capab_parse(int ac, char **av);
|
||||
|
||||
/**** sessions.c ****/
|
||||
|
||||
@@ -817,7 +814,7 @@ E void get_session_stats(long *nrec, long *memuse);
|
||||
E void get_exception_stats(long *nrec, long *memuse);
|
||||
|
||||
E int do_session(User *u);
|
||||
E int add_session(const char *nick, const char *host);
|
||||
E int add_session(char *nick, char *host);
|
||||
E void del_session(const char *host);
|
||||
|
||||
E void load_exceptions(void);
|
||||
@@ -848,36 +845,31 @@ E User *userlist[1024];
|
||||
E int32 usercnt, opcnt, maxusercnt;
|
||||
E time_t maxusertime;
|
||||
|
||||
E void set_umode(User * user, int ac, char **av);
|
||||
|
||||
E void delete_user(User *user);
|
||||
|
||||
E void get_user_stats(long *nusers, long *memuse);
|
||||
E User *finduser(const char *nick);
|
||||
E User *firstuser(void);
|
||||
E User *nextuser(void);
|
||||
E User *finduser_uid(const char *uid);
|
||||
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_VIAGRA) || defined(IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
E void update_host(User * user);
|
||||
E void change_user_host(User * user, const char *host);
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_VIAGRA) || defined(IRC_PTLINK)
|
||||
E void change_user_username(User * user, const char *username);
|
||||
E void change_user_realname(User * user, const char *realname);
|
||||
#endif
|
||||
|
||||
E User *do_nick(const char *source, char *nick, char *username, char *host,
|
||||
char *server, char *realname, time_t ts, uint32 svid, ...);
|
||||
char *server, char *realname, time_t ts, uint32 svid, uint32 ip, char *vhost, char *uid);
|
||||
|
||||
E void do_umode(const char *source, int ac, char **av);
|
||||
E void do_quit(const char *source, int ac, char **av);
|
||||
E void do_kill(const char *source, int ac, char **av);
|
||||
E void do_kill(char *source, char *reason);
|
||||
|
||||
E int is_oper(User * user);
|
||||
E int is_protected(User * user);
|
||||
|
||||
#ifdef HAS_EXCEPT
|
||||
E int is_excepted(ChannelInfo * ci, User * user);
|
||||
E int is_excepted_mask(ChannelInfo * ci, char *mask);
|
||||
#endif
|
||||
|
||||
E int match_usermask(const char *mask, User * user);
|
||||
E void split_usermask(const char *mask, char **nick, char **user,
|
||||
@@ -922,4 +914,128 @@ extern int encrypt_in_place(char *buf, int size);
|
||||
#endif
|
||||
|
||||
|
||||
E void privmsg(char *source, char *dest, const char *fmt, ...);
|
||||
E void notice(char *source, char *dest, const char *fmt, ...);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
extern void anope_cmd_211(const char *fmt, ...); /* 211 */
|
||||
extern void anope_cmd_219(char *source, char *who); /* 219 */
|
||||
extern void anope_cmd_242(const char *fmt, ...); /* 242 */
|
||||
extern void anope_cmd_243(const char *fmt, ...); /* 243 */
|
||||
extern void anope_cmd_250(const char *fmt, ...); /* 250 */
|
||||
extern void anope_cmd_307(const char *fmt, ...); /* 307 */
|
||||
extern void anope_cmd_311(const char *fmt, ...); /* 311 */
|
||||
extern void anope_cmd_312(const char *fmt, ...); /* 312 */
|
||||
extern void anope_cmd_317(const char *fmt, ...); /* 317 */
|
||||
extern void anope_cmd_318(char *source, char *who); /* 318 */
|
||||
extern void anope_cmd_351(char *source); /* 351 */
|
||||
extern void anope_cmd_372(char *source, char *msg); /* 372 */
|
||||
extern void anope_cmd_372_error(char *source); /* 372 */
|
||||
extern void anope_cmd_375(char *source); /* 375 */
|
||||
extern void anope_cmd_376(char *source); /* 376 */
|
||||
extern void anope_cmd_391(char *source, char *timestr); /* 391 */
|
||||
extern void anope_cmd_401(char *source, char *who); /* 401 */
|
||||
extern void anope_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason); /* AKILL */
|
||||
extern void anope_cmd_capab(); /* CAPAB */
|
||||
extern void anope_cmd_chghost(char *nick, char *vhost); /* CHGHOST */
|
||||
extern void anope_cmd_chgident(char *nick, char *vIdent); /* CHGIDENT */
|
||||
extern void anope_cmd_vhost_on(char *nick, char *vIdent, char *vhost); /* CHGHOST + CHGIDENT */
|
||||
extern void anope_cmd_vhost_off(char *nick);
|
||||
extern void anope_cmd_connect(int servernum); /* Connect */
|
||||
extern void anope_cmd_ea(); /* EA */
|
||||
extern void anope_cmd_global(char *source, const char *fmt, ...); /* GLOBOPS */
|
||||
extern void anope_cmd_invite(char *source, char *chan, char *nick); /* INVITE */
|
||||
extern void anope_cmd_join(char *user, char *channel, time_t chantime); /* JOIN */
|
||||
extern void anope_cmd_kick(char *source, char *chan, char *user, const char *fmt, ...); /* KICK */
|
||||
extern void anope_cmd_mode(char *source, char *dest, const char *fmt, ...); /* MODE */
|
||||
extern void anope_cmd_unban(char *name, char *nick); /* MODE -b */
|
||||
extern void anope_cmd_bot_chan_mode(char *nick, char *chan); /* MODE BotServ */
|
||||
extern void anope_cmd_netinfo(int ac, char **av); /* NETINFO */
|
||||
extern void anope_cmd_nick(char *nick, char *name, char *mode); /* NICK */
|
||||
extern void anope_cmd_chg_nick(char *oldnick, char *newnick); /* NICK */
|
||||
extern void anope_cmd_bot_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
|
||||
extern void anope_cmd_guest_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
|
||||
extern void anope_cmd_notice(char *source, char *dest, const char *fmt, ...); /* NOTICE */
|
||||
extern void anope_cmd_notice_ops(char *source, char *dest, const char *fmt, ...); /* NOTICE */
|
||||
extern void anope_cmd_notice2(char *source, char *dest, char *msg); /* NOTICE */
|
||||
extern void anope_cmd_serv_notice(char *source, char *dest, char *msg); /* NOTICE */
|
||||
extern void anope_cmd_part(char *nick, char *chan, const char *fmt, ...); /* PART */
|
||||
extern void anope_cmd_pass(char *pass); /* PASS */
|
||||
extern void anope_cmd_pong(char *servname, char *who); /* PONG */
|
||||
extern void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...); /* PRIVMSG */
|
||||
extern void anope_cmd_privmsg2(char *source, char *dest, char *msg); /* PRIVMSG */
|
||||
extern void anope_cmd_serv_privmsg(char *source, char *dest, char *msg); /* PRIVMSG */
|
||||
extern void anope_cmd_protoctl(); /* PROTOCTL */
|
||||
extern void anope_cmd_quit(char *source, const char *fmt, ...); /* QUIT */
|
||||
extern void anope_cmd_remove_akill(char *user, char *host); /* RAKILL */
|
||||
extern void anope_cmd_server(char *servname, int hop, char *descript); /* SERVER */
|
||||
extern void anope_cmd_sgline(char *mask, char *reason); /* SGLINE */
|
||||
extern void anope_cmd_sqline(char *mask, char *reason); /* SQLINE */
|
||||
extern void anope_cmd_szline(char *mask, char *reason); /* SZLINE */
|
||||
extern void anope_cmd_squit(char *servname, char *message); /* SQUIT */
|
||||
extern void anope_cmd_svinfo(); /* SVINFO */
|
||||
extern void anope_cmd_svshold(char *nick); /* SVSHOLD */
|
||||
extern void anope_cmd_relase_svshold(char *nick); /* SVSHOLD */
|
||||
extern void anope_cmd_svsinfo(); /* SVSINFO */
|
||||
extern void anope_cmd_svskill(char *source,char *user, const char *fmt, ...); /* SVSKILL */
|
||||
extern void anope_cmd_svsmode(User * u, int ac, char **av); /* SVSMODE */
|
||||
extern void anope_cmd_svsnick(char *nick,char *newnick, time_t when); /* SVSNICK */
|
||||
extern void anope_cmd_svsnoop(char *server, int set); /* SVSNOOP */
|
||||
extern void anope_cmd_svso(char *source,char *nick, char *flag); /* SVSO */
|
||||
extern void anope_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when); /* TOPIC */
|
||||
extern void anope_cmd_unsgline(char *mask); /* UNSGLINE */
|
||||
extern void anope_cmd_unsqline(char *user); /* UNSQLINE */
|
||||
extern void anope_cmd_unszline(char *mask); /* UNSZLINE */
|
||||
|
||||
extern int anope_event_436(char *source, int ac, char **av);
|
||||
extern int anope_event_away(char *source, int ac, char **av);
|
||||
extern int anope_event_ping(char *source, int ac, char **av);
|
||||
extern int anope_event_motd(char *source, int ac, char **av);
|
||||
extern int anope_event_join(char *source, int ac, char **av);
|
||||
extern int anope_event_kick(char *source, int ac, char **av);
|
||||
extern int anope_event_kill(char *source, int ac, char **av);
|
||||
extern int anope_event_mode(char *source, int ac, char **av);
|
||||
extern int anope_event_quit(char *source, int ac, char **av);
|
||||
extern int anope_event_squit(char *source, int ac, char **av);
|
||||
extern int anope_event_topic(char *source, int ac, char **av);
|
||||
extern int anope_event_whois(char *source, int ac, char **av);
|
||||
extern int anope_event_part(char *source, int ac, char **av);
|
||||
extern int anope_event_server(char *source, int ac, char **av);
|
||||
extern int anope_event_nick(char *source, int ac, char **av);
|
||||
extern int anope_event_privmsg(char *source, int ac, char **av);
|
||||
extern int anope_event_capab(char *source, int ac, char **av);
|
||||
extern int anope_event_sjoin(char *source, int ac, char **av);
|
||||
extern int anope_event_cs(char *source, int ac, char **av);
|
||||
extern int anope_event_hs(char *source, int ac, char **av);
|
||||
extern int anope_event_ms(char *source, int ac, char **av);
|
||||
extern int anope_event_ns(char *source, int ac, char **av);
|
||||
extern int anope_event_os(char *source, int ac, char **av);
|
||||
extern int anope_event_vs(char *source, int ac, char **av);
|
||||
extern int anope_event_svinfo(char *source, int ac, char **av);
|
||||
extern int anope_event_chghost(char *source, int ac, char **av);
|
||||
extern int anope_event_sethost(char *source, int ac, char **av);
|
||||
extern int anope_event_chgident(char *source, int ac, char **av);
|
||||
extern int anope_event_setident(char *source, int ac, char **av);
|
||||
extern int anope_event_chgname(char *source, int ac, char **av);
|
||||
extern int anope_event_setname(char *source, int ac, char **av);
|
||||
extern int anope_event_svsinfo(char *source, int ac, char **av);
|
||||
extern int anope_event_snick(char *source, int ac, char **av);
|
||||
extern int anope_event_vhost(char *source, int ac, char **av); /* Rage IRCD Only */
|
||||
extern int anope_event_tkl(char *source, int ac, char **av);
|
||||
extern int anope_event_eos(char *source, int ac, char **av);
|
||||
extern int anope_event_pass(char *source, int ac, char **av);
|
||||
extern int anope_event_netinfo(char *source, int ac, char **av);
|
||||
extern int anope_event_error(char *source, int ac, char **av);
|
||||
extern int anope_event_eb(char *source, int ac, char **av);
|
||||
|
||||
extern void anope_set_umode(User * user, int ac, char **av);
|
||||
extern void anope_cmd_svid_umode(char *nick, time_t ts);
|
||||
extern void anope_cmd_svid_umode2(User *u, char *ts);
|
||||
extern void anope_cmd_svid_umode3(User *u, char *ts);
|
||||
extern void anope_cmd_nc_change(User *u);
|
||||
|
||||
extern char *common_get_vident(User *u);
|
||||
extern char *common_get_vhost(User *u);
|
||||
|
||||
#endif /* EXTERN_H */
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Hybrid IRCD functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_HYBRID
|
||||
|
||||
#define PROTECT_SET_MODE "+"
|
||||
#define PROTECT_UNSET_MODE "+"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_a 0x00000400
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* PTLink IRCD functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_PTLINK
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_A 0x00000400
|
||||
#define CMODE_B 0x00000800
|
||||
#define CMODE_c 0x00001000
|
||||
#define CMODE_d 0x00002000
|
||||
#define CMODE_f 0x00004000
|
||||
#define CMODE_K 0x00008000
|
||||
#define CMODE_O 0x00010000
|
||||
#define CMODE_q 0x00020000
|
||||
#define CMODE_S 0x00040000
|
||||
#define CMODE_N 0x00080000
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Rage IRCD functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_RAGE2
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define FANT_PROTECT_ADD "!admin"
|
||||
#define FANT_PROTECT_DEL "!deadmin"
|
||||
#define LEVEL_PROTECT_WORD "AUTOADMIN"
|
||||
#define LEVELINFO_PROTECT_WORD "ADMIN"
|
||||
#define LEVELINFO_PROTECTME_WORD "ADMINME"
|
||||
#define CS_CMD_PROTECT "ADMIN"
|
||||
#define CS_CMD_DEPROTECT "DEADMIN"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_R 0x80000000
|
||||
#define UMODE_x 0x40000000
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_A 0x00000800
|
||||
#define CMODE_N 0x00001000
|
||||
#define CMODE_S 0x00002000
|
||||
#define CMODE_C 0x00004000
|
||||
#define CMODE_c 0x00000400 /* Colors can't be used */
|
||||
#define CMODE_M 0x00000800 /* Non-regged nicks can't send messages */
|
||||
#define CMODE_O 0x00008000 /* Only opers can join */
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
#define CMODE_I 0x08000000
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
+366
-805
File diff suppressed because it is too large
Load Diff
@@ -109,13 +109,16 @@
|
||||
#undef IRC_RAGE2
|
||||
|
||||
/* "Second IRCD type" */
|
||||
#undef IRC_ULTIMATE
|
||||
#undef IRC_ULTIMATE2
|
||||
|
||||
/* "Second IRCD type" */
|
||||
#undef IRC_ULTIMATE3
|
||||
|
||||
/* "Second IRCD type" */
|
||||
#undef IRC_UNREAL
|
||||
#undef IRC_UNREAL31
|
||||
|
||||
/* "Second IRCD type" */
|
||||
#undef IRC_UNREAL32
|
||||
|
||||
/* "Second IRCD type" */
|
||||
#undef IRC_VIAGRA
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Ultimate IRCD 2 functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_ULTIMATE2
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_p 0x04000000
|
||||
#define UMODE_R 0x08000000
|
||||
#define UMODE_P 0x20000000
|
||||
#define UMODE_g 0x80000000
|
||||
#define UMODE_x 0x40000000
|
||||
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_f 0x00000400
|
||||
#define CMODE_x 0x00000800
|
||||
#define CMODE_A 0x00001000
|
||||
#define CMODE_I 0x00002000
|
||||
#define CMODE_K 0x00004000
|
||||
#define CMODE_L 0x00008000
|
||||
#define CMODE_O 0x00010000
|
||||
#define CMODE_S 0x00020000
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Ultimate IRCD 3.0 functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_ULTIMATE3
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define FANT_PROTECT_ADD "!admin"
|
||||
#define FANT_PROTECT_DEL "!deadmin"
|
||||
#define LEVEL_PROTECT_WORD "AUTOADMIN"
|
||||
#define LEVELINFO_PROTECT_WORD "ADMIN"
|
||||
#define LEVELINFO_PROTECTME_WORD "ADMINME"
|
||||
#define CS_CMD_PROTECT "ADMIN"
|
||||
#define CS_CMD_DEPROTECT "DEADMIN"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_p 0x04000000
|
||||
#define UMODE_Z 0x08000000
|
||||
#define UMODE_P 0x20000000
|
||||
#define UMODE_R 0x80000000
|
||||
#define UMODE_x 0x40000000
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_A 0x00000800
|
||||
#define CMODE_N 0x00001000
|
||||
#define CMODE_S 0x00002000
|
||||
#define CMODE_K 0x00004000
|
||||
#define CMODE_c 0x00000400 /* Colors can't be used */
|
||||
#define CMODE_M 0x00000800 /* Non-regged nicks can't send messages */
|
||||
#define CMODE_O 0x00008000 /* Only opers can join */
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/* Unreal IRCD 3.1.x functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef IRC_UNREAL31
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_g 0x80000000
|
||||
#define UMODE_x 0x40000000
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_c 0x00000400
|
||||
#define CMODE_A 0x00000800
|
||||
#define CMODE_H 0x00001000
|
||||
#define CMODE_K 0x00002000
|
||||
#define CMODE_L 0x00004000
|
||||
#define CMODE_O 0x00008000
|
||||
#define CMODE_Q 0x00010000
|
||||
#define CMODE_S 0x00020000
|
||||
#define CMODE_V 0x00040000
|
||||
#define CMODE_f 0x00080000
|
||||
#define CMODE_G 0x00100000
|
||||
#define CMODE_C 0x00200000
|
||||
#define CMODE_u 0x00400000
|
||||
#define CMODE_z 0x00800000
|
||||
#define CMODE_N 0x01000000
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Unreal IRCD 3.2.x functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_UNREAL32
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* User Modes */
|
||||
#define UMODE_a 0x00000001
|
||||
#define UMODE_h 0x00000002
|
||||
#define UMODE_i 0x00000004
|
||||
#define UMODE_o 0x00000008
|
||||
#define UMODE_r 0x00000010
|
||||
#define UMODE_w 0x00000020
|
||||
#define UMODE_A 0x00000040
|
||||
#define UMODE_g 0x80000000
|
||||
#define UMODE_x 0x40000000
|
||||
#define UMODE_R 0x80000000
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Channel Modes */
|
||||
|
||||
#define CMODE_i 0x00000001
|
||||
#define CMODE_m 0x00000002
|
||||
#define CMODE_n 0x00000004
|
||||
#define CMODE_p 0x00000008
|
||||
#define CMODE_s 0x00000010
|
||||
#define CMODE_t 0x00000020
|
||||
#define CMODE_k 0x00000040 /* These two used only by ChanServ */
|
||||
#define CMODE_l 0x00000080
|
||||
#define CMODE_c 0x00000400
|
||||
#define CMODE_A 0x00000800
|
||||
#define CMODE_H 0x00001000
|
||||
#define CMODE_K 0x00002000
|
||||
#define CMODE_L 0x00004000
|
||||
#define CMODE_O 0x00008000
|
||||
#define CMODE_Q 0x00010000
|
||||
#define CMODE_S 0x00020000
|
||||
#define CMODE_V 0x00040000
|
||||
#define CMODE_f 0x00080000
|
||||
#define CMODE_G 0x00100000
|
||||
#define CMODE_C 0x00200000
|
||||
#define CMODE_u 0x00400000
|
||||
#define CMODE_z 0x00800000
|
||||
#define CMODE_N 0x01000000
|
||||
#define CMODE_R 0x00000100 /* Only identified users can join */
|
||||
#define CMODE_r 0x00000200 /* Set for all registered channels */
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Since we differ !protect from !admin we need to know what to use */
|
||||
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Default Modes with MLOCK */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
+2
-35
@@ -50,40 +50,6 @@ const char version_number[] = "$VERSION";
|
||||
const char version_build[] =
|
||||
"build #" BUILD ", compiled " __DATE__ " " __TIME__;
|
||||
|
||||
const char version_protocol[] =
|
||||
#if defined(IRC_ULTIMATE3)
|
||||
"UltimateIRCd 3.0.0.a26+"
|
||||
# define VER_IRCD "UltimateIRCd 3.0.* -"
|
||||
#elif defined(IRC_VIAGRA)
|
||||
"ViagraIRCd 1.3.x"
|
||||
# define VER_IRCD "ViagraIRCd 1.3.* -"
|
||||
#elif defined(IRC_RAGE2)
|
||||
"RageIRCd 2.0.x"
|
||||
# define VER_IRCD "RageIRCd 2.0.* -"
|
||||
#elif defined(IRC_BAHAMUT)
|
||||
"Bahamut 1.4.27+"
|
||||
# define VER_IRCD "BahamutIRCd 1.4.*/1.8.* -"
|
||||
#elif defined(IRC_ULTIMATE)
|
||||
"UltimateIRCd 2.8.2+"
|
||||
# define VER_IRCD "UltimateIRCd 2.8.* -"
|
||||
#elif defined(IRC_UNREAL)
|
||||
"UnrealIRCd 3.1.1+"
|
||||
# define VER_IRCD "UnrealIRCd -"
|
||||
#elif defined(IRC_DREAMFORGE)
|
||||
"DreamForge 4.6.7"
|
||||
# define VER_IRCD "DreamForgeIRCd 4.6.7 -"
|
||||
#elif defined(IRC_HYBRID)
|
||||
"Hybrid IRCd 7.0"
|
||||
# define VER_IRCD "HybridIRCd 7.* -"
|
||||
#elif defined(IRC_PTLINK)
|
||||
"PTlink 6.14.5+"
|
||||
# define VER_IRCD "PTlinkIRCd 6.14.* -"
|
||||
#else
|
||||
"unknown"
|
||||
# define VER_IRCD
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef DEBUG_COMMANDS
|
||||
# define VER_DEBUG "D"
|
||||
#else
|
||||
@@ -140,7 +106,8 @@ const char version_protocol[] =
|
||||
# define VER_MODULE
|
||||
#endif
|
||||
|
||||
const char version_flags[] = VER_IRCD VER_DEBUG VER_ENCRYPTION VER_THREAD VER_OS VER_GHBNR VER_MYSQL VER_MODULE;
|
||||
/* the space is needed cause if you build with nothing it will complain */
|
||||
const char version_flags[] = " " VER_DEBUG VER_ENCRYPTION VER_THREAD VER_OS VER_GHBNR VER_MYSQL VER_MODULE;
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* Viagra IRCD functions
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
* Contact us at info@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef IRC_VIAGRA
|
||||
|
||||
#define PROTECT_SET_MODE "+a"
|
||||
#define PROTECT_UNSET_MODE "+a"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
/* User Modes */
|
||||
#define UMODE_A 0x00000040 /* Is a Server Administrator. */
|
||||
#define UMODE_C 0x00002000 /* Is a Server Co Administrator. */
|
||||
#define UMODE_I 0x00008000 /* Stealth mode, makes you beeing hidden at channel. invisible joins/parts. */
|
||||
#define UMODE_N 0x00000400 /* Is a Network Administrator. */
|
||||
#define UMODE_O 0x00004000 /* Local IRC Operator. */
|
||||
#define UMODE_Q 0x00001000 /* Is an Abuse Administrator. */
|
||||
#define UMODE_R 0x08000000 /* Cant receive messages from non registered user. */
|
||||
#define UMODE_S 0x00000080 /* Is a Network Service. For Services only. */
|
||||
#define UMODE_T 0x00000800 /* Is a Technical Administrator. */
|
||||
#define UMODE_a 0x00000001 /* Is a Services Administrator. */
|
||||
#define UMODE_b 0x00040000 /* Can listen to generic bot warnings. */
|
||||
#define UMODE_c 0x00010000 /* See's all connects/disconnects on local server. */
|
||||
#define UMODE_d 0x00000100 /* Can listen to debug and channel cration notices. */
|
||||
#define UMODE_e 0x00080000 /* Can see client connections/exits on remote servers. */
|
||||
#define UMODE_f 0x00100000 /* Listen to flood/spam alerts from server. */
|
||||
#define UMODE_g 0x00000200 /* Can read & send to globops, and locops. */
|
||||
#define UMODE_h 0x00000002 /* Is a Help Operator. */
|
||||
#define UMODE_i 0x00000004 /* Invisible (Not shown in /who and /names searches). */
|
||||
#define UMODE_n 0x00020000 /* Can see client nick change notices. */
|
||||
#define UMODE_o 0x00000008 /* Global IRC Operator. */
|
||||
#define UMODE_r 0x00000010 /* Identifies the nick as being registered. */
|
||||
#define UMODE_s 0x00200000 /* Can listen to generic server messages. */
|
||||
#define UMODE_w 0x00000020 /* Can listen to wallop messages. */
|
||||
#define UMODE_x 0x40000000 /* Gives the user hidden hostname. */
|
||||
|
||||
|
||||
/* Channel Modes */
|
||||
#define CMODE_i 0x00000001 /* Invite-only allowed. */
|
||||
#define CMODE_m 0x00000002 /* Moderated channel, noone can speak and changing nick except users with mode +vho */
|
||||
#define CMODE_n 0x00000004 /* No messages from outside channel */
|
||||
#define CMODE_p 0x00000008 /* Private channel. */
|
||||
#define CMODE_s 0x00000010 /* Secret channel. */
|
||||
#define CMODE_t 0x00000020 /* Only channel operators may set the topic */
|
||||
#define CMODE_k 0x00000040 /* Needs the channel key to join the channel */
|
||||
#define CMODE_l 0x00000080 /* Channel may hold at most <number> of users */
|
||||
#define CMODE_R 0x00000100 /* Requires a registered nickname to join the channel. */
|
||||
#define CMODE_r 0x00000200 /* Channel is registered. */
|
||||
#define CMODE_c 0x00000400 /* No ANSI color can be sent to the channel */
|
||||
#define CMODE_M 0x00000800 /* Requires a registered nickname to speak at the channel. */
|
||||
#define CMODE_H 0x00001000 /* HelpOps only channel. */
|
||||
#define CMODE_O 0x00008000 /* IRCOps only channel. */
|
||||
#define CMODE_S 0x00020000 /* Strips all mesages out of colors. */
|
||||
#define CMODE_N 0x01000000 /* No nickchanges allowed. */
|
||||
#define CMODE_P 0x02000000 /* "Peace mode" No kicks allowed unless by u:lines */
|
||||
#define CMODE_x 0x04000000 /* No bold/underlined or reversed text can be sent to the channel */
|
||||
|
||||
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
|
||||
|
||||
#endif
|
||||
|
||||
+13
@@ -6282,3 +6282,16 @@ HOST_HELP_GROUP
|
||||
This command allows users to set the vhost of thier
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6482,3 +6482,15 @@ HOST_HELP_GROUP
|
||||
Dieses Command erlaubt es Usern, den vhost ihres aktuellen
|
||||
Nicks, zum vhost der gessamten Group zu setzen.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6023,3 +6023,16 @@ HOST_HELP_GROUP
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
|
||||
@@ -6292,3 +6292,16 @@ HOST_HELP_GROUP
|
||||
Este comando permite a usuarios a setear el vhost de su
|
||||
nick actual para ser el vhost para todos los nicks en el
|
||||
mismo grupo.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6314,3 +6314,16 @@ HOST_HELP_GROUP
|
||||
|
||||
Permet d'enregistrer la vHost du nick actuellement
|
||||
utilisé pour tous les pseudos du groupe.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6159,3 +6159,16 @@ HOST_HELP_GROUP
|
||||
This command allows users to set the vhost of thier
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
+12
@@ -6044,3 +6044,15 @@ HOST_HELP_GROUP
|
||||
Ez a parancs lehetővé teszi, hogy a JELENLEGI nick
|
||||
vhostját beállítsuk a csoport minden nickjére.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6317,3 +6317,16 @@ HOST_HELP_GROUP
|
||||
|
||||
Questo comando permette agli utenti di impostare il vhost del
|
||||
loro nick ATTUALE come vhost di tutti i nick nello stesso gruppo.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6182,3 +6182,16 @@ HOST_HELP_GROUP
|
||||
HUIDIGE nick de vhost van alle nicks in de zelfde groep te
|
||||
laten zijn.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
|
||||
@@ -6597,3 +6597,15 @@ HOST_HELP_GROUP
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -5916,3 +5916,16 @@ HOST_HELP_GROUP
|
||||
This command allows users to set the vhost of thier
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6061,3 +6061,16 @@ HOST_HELP_GROUP
|
||||
Эта команда позволяет пользователям установить виртуальный хост с их
|
||||
ТЕКУЩЕГО ника на все ники
|
||||
группы.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
@@ -6092,3 +6092,16 @@ HOST_HELP_GROUP
|
||||
This command allows users to set the vhost of thier
|
||||
CURRENT nick to be the vhost for all nicks in the same
|
||||
group.
|
||||
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
Sorry, SVSNICK is not available on this network.
|
||||
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
Sorry, SQLINE is not available on this network.
|
||||
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
Sorry, OLINE is not available on this network.
|
||||
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
Sorry, UMODE is not available on this network.
|
||||
|
||||
|
||||
+11
-4
@@ -3,13 +3,16 @@ RDB_OBJ = $(RDB:.c=.o)
|
||||
OBJS = actions.o botserv.o channels.o chanserv.o commands.o compat.o converter.o \
|
||||
config.o datafiles.o encrypt.o helpserv.o hostserv.o init.o language.o list.o log.o mail.o main.o \
|
||||
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
|
||||
process.o protocol.o proxy.o send.o servers.o sessions.o slist.o sockutil.o \
|
||||
timeout.o users.o \
|
||||
process.o proxy.o send.o servers.o sessions.o slist.o sockutil.o \
|
||||
timeout.o users.o dreamforge.o bahamut.o unreal31.o ultimate2.o ultimate3.o \
|
||||
hybrid.o ptlink.o viagra.o rageircd.o unreal32.o \
|
||||
$(VSNPRINTF_O) $(RDB_OBJ) $(MYSQL_OBJ)
|
||||
SRCS = actions.c botserv.c channels.c chanserv.c commands.c compat.c converter.c \
|
||||
config.c datafiles.c encrypt.c helpserv.c hostserv.c init.c language.c list.c log.c mail.c main.c \
|
||||
memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \
|
||||
process.c protocol.c proxy.c send.c servers.c sessions.c slist.c sockutil.c \
|
||||
process.c proxy.c send.c servers.c sessions.c slist.c sockutil.c \
|
||||
dreamforge.c bahamut.c unreal31.c ultimate2.c ultimate3.c \
|
||||
hybrid.c ptlink.c viagra.c rageircd.c unreal32.c \
|
||||
timeout.c users.c \
|
||||
$(VSNPRINTF_C) $(RDB) $(MYSQL)
|
||||
|
||||
@@ -17,7 +20,11 @@ INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \
|
||||
../include/pseudo.h ../include/sysconf.h ../include/config.h \
|
||||
../include/encrypt.h ../include/messages.h ../include/services.h \
|
||||
../include/timeout.h ../include/datafiles.h ../include/extern.h \
|
||||
../include/modules.h ../include/slist.h ../include/version.h
|
||||
../include/modules.h ../include/slist.h ../include/version.h \
|
||||
../include/dreamforge.h ../include/bahamut.h ../include/ultimate2.h \
|
||||
../include/ultimate3.h ../include/hybrid.h ../include/ptlink.h ../include/unreal31.h \
|
||||
../include/viagra.h ../include/rageircd.h ../include/unreal32.h
|
||||
|
||||
|
||||
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
|
||||
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
|
||||
|
||||
+125
-38
@@ -38,43 +38,12 @@ void bad_password(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void change_user_mode(User * u, char *modes, char *arg)
|
||||
{
|
||||
#ifndef IRC_HYBRID
|
||||
int ac = 1;
|
||||
char *av[2];
|
||||
|
||||
av[0] = modes;
|
||||
if (arg) {
|
||||
av[1] = arg;
|
||||
ac++;
|
||||
}
|
||||
#ifdef IRC_BAHAMUT
|
||||
send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick, u->timestamp,
|
||||
av[0], (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
|
||||
#else
|
||||
send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
|
||||
(ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
|
||||
#endif
|
||||
set_umode(u, ac, av);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Remove a user from the IRC network. `source' is the nick which should
|
||||
* generate the kill, or NULL for a server-generated kill.
|
||||
*/
|
||||
|
||||
void kill_user(const char *source, const char *user, const char *reason)
|
||||
void kill_user(char *source, char *user, char *reason)
|
||||
{
|
||||
#ifdef IRC_BAHAMUT
|
||||
/* Bahamut uses SVSKILL as a better way to kill users. It sends back
|
||||
* a QUIT message that Anope uses to clean up after the kill is done.
|
||||
*/
|
||||
send_cmd(NULL, "SVSKILL %s :%s", user, reason);
|
||||
#else
|
||||
char *av[2];
|
||||
char buf[BUFSIZE];
|
||||
|
||||
if (!user || !*user)
|
||||
@@ -83,13 +52,131 @@ void kill_user(const char *source, const char *user, const char *reason)
|
||||
source = ServerName;
|
||||
if (!reason)
|
||||
reason = "";
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s (%s)", source, reason);
|
||||
av[0] = sstrdup(user);
|
||||
av[1] = buf;
|
||||
send_cmd(source, "KILL %s :%s", user, av[1]);
|
||||
do_kill(source, 2, av);
|
||||
free(av[0]);
|
||||
#endif
|
||||
|
||||
anope_cmd_svskill(source, user, buf);
|
||||
|
||||
if (!ircd->quitonkill) {
|
||||
do_kill(user, buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void sqline(char *mask, char *reason)
|
||||
{
|
||||
if (ircd->chansqline) {
|
||||
if (*mask == '#') {
|
||||
int i;
|
||||
Channel *c, *next;
|
||||
|
||||
char *av[3];
|
||||
struct c_userlist *cu, *cunext;
|
||||
|
||||
anope_cmd_sqline(mask, reason);
|
||||
|
||||
for (i = 0; i < 1024; i++) {
|
||||
for (c = chanlist[i]; c; c = next) {
|
||||
next = c->next;
|
||||
|
||||
if (!match_wild_nocase(mask, c->name))
|
||||
continue;
|
||||
|
||||
for (cu = c->users; cu; cu = cunext) {
|
||||
cunext = cu->next;
|
||||
|
||||
if (is_oper(cu->user))
|
||||
continue;
|
||||
|
||||
av[0] = c->name;
|
||||
av[1] = cu->user->nick;
|
||||
av[2] = reason;
|
||||
anope_cmd_kick(s_OperServ, av[0], av[1],
|
||||
"Q-Lined: %s", av[2]);
|
||||
do_kick(s_ChanServ, 3, av);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
anope_cmd_sqline(mask, reason);
|
||||
}
|
||||
} else {
|
||||
anope_cmd_sqline(mask, reason);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void common_unban(ChannelInfo * ci, char *nick)
|
||||
{
|
||||
int count, i;
|
||||
char *av[3], **bans;
|
||||
User *u;
|
||||
|
||||
if (!ci || !ci->c || !ci->bi || !nick)
|
||||
return;
|
||||
if (!(u = finduser(nick)))
|
||||
return;
|
||||
|
||||
if (ircd->svsmode_unban) {
|
||||
anope_cmd_unban(ci->name, nick);
|
||||
} else {
|
||||
av[0] = ci->name;
|
||||
av[1] = sstrdup("-b");
|
||||
count = ci->c->bancount;
|
||||
bans = scalloc(sizeof(char *) * count, 1);
|
||||
memcpy(bans, ci->c->bans, sizeof(char *) * count);
|
||||
for (i = 0; i < count; i++) {
|
||||
if (match_usermask(bans[i], u)) {
|
||||
anope_cmd_mode(whosends(ci), ci->name, "-b %s", bans[i]);
|
||||
av[2] = bans[i];
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
}
|
||||
}
|
||||
free(bans);
|
||||
free(av[1]);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void common_svsmode(User * u, char *modes, char *arg)
|
||||
{
|
||||
int ac = 1;
|
||||
char *av[2];
|
||||
|
||||
av[0] = modes;
|
||||
if (arg) {
|
||||
av[1] = arg;
|
||||
ac++;
|
||||
}
|
||||
anope_cmd_svsmode(u, ac, av);
|
||||
anope_set_umode(u, ac, av);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
char *common_get_vhost(User * u)
|
||||
{
|
||||
if (u->mode & ircd->vhostmode) {
|
||||
return u->vhost;
|
||||
} else {
|
||||
return u->host;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
char *common_get_vident(User * u)
|
||||
{
|
||||
if (u->mode & ircd->vhostmode) {
|
||||
if (u->vident) {
|
||||
return u->vident;
|
||||
} else {
|
||||
return u->username;
|
||||
}
|
||||
} else {
|
||||
return u->username;
|
||||
}
|
||||
}
|
||||
|
||||
+1299
File diff suppressed because it is too large
Load Diff
+80
-157
@@ -46,7 +46,6 @@ static void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick,
|
||||
char *reason);
|
||||
static void bot_raw_mode(User * requester, ChannelInfo * ci, char *mode,
|
||||
char *nick);
|
||||
static void bot_raw_unban(ChannelInfo * ci, char *nick);
|
||||
|
||||
static int do_help(User * u);
|
||||
static int do_bot(User * u);
|
||||
@@ -222,20 +221,9 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
cstatus = chan_get_user_status(ci->c, u);
|
||||
|
||||
if (buf && !check_access(u, ci, CA_NOKICK) &&
|
||||
#ifdef HAS_HALFOP
|
||||
#if defined(IRC_UNREAL) || defined (IRC_VIAGRA)
|
||||
(!(ci->botflags & BS_DONTKICKOPS)
|
||||
|| !(cstatus & (CUS_HALFOP | CUS_OP | CUS_OWNER | CUS_PROTECT)))
|
||||
# elif defined (IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
(!(ci->botflags & BS_DONTKICKOPS)
|
||||
|| !(cstatus & (CUS_HALFOP | CUS_OP | CUS_PROTECT)))
|
||||
# else
|
||||
(!(ci->botflags & BS_DONTKICKOPS)
|
||||
|| !(cstatus & (CUS_HALFOP | CUS_OP)))
|
||||
# endif
|
||||
#else
|
||||
(!(ci->botflags & BS_DONTKICKOPS) || !(cstatus & CUS_OP))
|
||||
#endif
|
||||
|
||||
&& (!(ci->botflags & BS_DONTKICKVOICES) || !(cstatus & CUS_VOICE))) {
|
||||
/* Bolds kicker */
|
||||
if ((ci->botflags & BS_KICK_BOLDS) && strchr(buf, 2)) {
|
||||
@@ -466,13 +454,10 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
cmd = strtok(buf, " ");
|
||||
|
||||
if (cmd) {
|
||||
#if defined(IRC_UNREAL) || defined (IRC_VIAGRA)
|
||||
if (!stricmp(cmd, "!deowner")) {
|
||||
if (!stricmp(cmd, "!deowner") && ircd->owner) {
|
||||
if (is_founder(u, ci))
|
||||
bot_raw_mode(u, ci, "-q", u->nick);
|
||||
} else
|
||||
#endif
|
||||
if (!stricmp(cmd, "!kb")) {
|
||||
} else if (!stricmp(cmd, "!kb")) {
|
||||
char *target = strtok(NULL, " ");
|
||||
char *reason = strtok(NULL, "");
|
||||
|
||||
@@ -502,11 +487,9 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
else
|
||||
bot_raw_kick(u, ci, target, reason);
|
||||
}
|
||||
#if defined(IRC_UNREAL) || defined (IRC_VIAGRA)
|
||||
} else if (!stricmp(cmd, "!owner")) {
|
||||
} else if (!stricmp(cmd, "!owner") && ircd->owner) {
|
||||
if (is_founder(u, ci))
|
||||
bot_raw_mode(u, ci, "+q", u->nick);
|
||||
#endif
|
||||
} else if (!stricmp(cmd, "!seen")) {
|
||||
char *target = strtok(NULL, " ");
|
||||
char buf[BUFSIZE];
|
||||
@@ -520,16 +503,16 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
/* If we look for the bot */
|
||||
snprintf(buf, sizeof(buf),
|
||||
getstring(u->na, BOT_SEEN_BOT), u->nick);
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
buf);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
buf);
|
||||
} else if (!(na = findnick(target))
|
||||
|| (na->status & NS_VERBOTEN)) {
|
||||
/* If the nick is not registered or forbidden */
|
||||
snprintf(buf, sizeof(buf),
|
||||
getstring(u->na, BOT_SEEN_UNKNOWN),
|
||||
target);
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
buf);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
buf);
|
||||
} else if ((u2 = nc_on_chan(ci->c, na->nc))) {
|
||||
/* If the nick we're looking for is on the channel,
|
||||
* there are three possibilities: it's yourself,
|
||||
@@ -549,8 +532,8 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
getstring(u->na,
|
||||
BOT_SEEN_ON_CHANNEL_AS),
|
||||
target, u2->nick);
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
buf);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
buf);
|
||||
} else if ((access = get_access_entry(na->nc, ci))) {
|
||||
/* User is on the access list but not present actually.
|
||||
Special case: if access->last_seen is 0 it's that we
|
||||
@@ -568,15 +551,15 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
getstring(u->na, BOT_SEEN_NEVER),
|
||||
target);
|
||||
}
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
buf);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
buf);
|
||||
} else {
|
||||
/* All other cases */
|
||||
snprintf(buf, sizeof(buf),
|
||||
getstring(u->na, BOT_SEEN_UNKNOWN),
|
||||
target);
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
buf);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
buf);
|
||||
}
|
||||
}
|
||||
} else if (!stricmp(cmd, "!unban")
|
||||
@@ -584,9 +567,9 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
char *target = strtok(NULL, " ");
|
||||
|
||||
if (!target)
|
||||
bot_raw_unban(ci, u->nick);
|
||||
common_unban(ci, u->nick);
|
||||
else
|
||||
bot_raw_unban(ci, target);
|
||||
common_unban(ci, target);
|
||||
} else {
|
||||
CSModeUtil *util = csmodeutils;
|
||||
|
||||
@@ -669,7 +652,7 @@ void load_bs_dbase(void)
|
||||
restore_db(f); \
|
||||
log_perror("Write error on %s", BotDBName); \
|
||||
if (time(NULL) - lastwarn > WarningTimeout) { \
|
||||
wallops(NULL, "Write error on %s: %s", BotDBName, \
|
||||
anope_cmd_global(NULL, "Write error on %s: %s", BotDBName, \
|
||||
strerror(errno)); \
|
||||
lastwarn = time(NULL); \
|
||||
} \
|
||||
@@ -830,8 +813,8 @@ BotInfo *findbot(char *nick)
|
||||
static void unassign(User * u, ChannelInfo * ci)
|
||||
{
|
||||
if (ci->c && ci->c->usercount >= BSMinUsers) {
|
||||
send_cmd(ci->bi->nick, "PART %s :UNASSIGN from %s", ci->name,
|
||||
u->nick);
|
||||
anope_cmd_part(ci->bi->nick, ci->name, "UNASSIGN from %s",
|
||||
u->nick);
|
||||
}
|
||||
ci->bi->chancount--;
|
||||
ci->bi = NULL;
|
||||
@@ -851,7 +834,8 @@ static BanData *get_ban_data(Channel * c, User * u)
|
||||
if (!c || !u)
|
||||
return NULL;
|
||||
|
||||
snprintf(mask, sizeof(mask), "%s@%s", u->username, GetHost(u));
|
||||
snprintf(mask, sizeof(mask), "%s@%s", u->username,
|
||||
common_get_vhost(u));
|
||||
|
||||
for (bd = c->bd; bd; bd = next) {
|
||||
if (now - bd->last_use > BSKeepData) {
|
||||
@@ -955,7 +939,7 @@ void bot_join(ChannelInfo * ci)
|
||||
av[1] = sstrdup("-b");
|
||||
for (i = 0; i < count; i++) {
|
||||
if (match_wild_nocase(ci->c->bans[i], botmask)) {
|
||||
send_mode(ci->bi->nick, ci->name, "%s", bans[i]);
|
||||
anope_cmd_mode(ci->bi->nick, ci->name, "%s", bans[i]);
|
||||
av[2] = sstrdup(bans[i]);
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
free(av[2]);
|
||||
@@ -968,29 +952,12 @@ void bot_join(ChannelInfo * ci)
|
||||
/* Should we be invited? */
|
||||
if ((ci->c->mode & CMODE_i)
|
||||
|| (ci->c->limit && ci->c->usercount >= ci->c->limit))
|
||||
send_cmd(NULL, "NOTICE @%s :%s invited %s into the channel.",
|
||||
ci->c->name, ci->bi->nick, ci->bi->nick);
|
||||
anope_cmd_notice_ops(NULL, ci->c->name,
|
||||
"%s invited %s into the channel.",
|
||||
ci->bi->nick, ci->bi->nick);
|
||||
}
|
||||
#ifdef IRC_BAHAMUT
|
||||
send_cmd(ci->bi->nick, "SJOIN %ld %s", ci->c->creation_time,
|
||||
ci->c->name);
|
||||
#elif defined(IRC_HYBRID)
|
||||
send_cmd(NULL, "SJOIN %ld %s + :%s", time(NULL), ci->c->name,
|
||||
ci->bi->nick);
|
||||
#else
|
||||
send_cmd(ci->bi->nick, "JOIN %s", ci->c->name);
|
||||
#endif
|
||||
|
||||
#if defined(IRC_UNREAL) || defined (IRC_VIAGRA)
|
||||
send_mode(ci->bi->nick, ci->c->name, "+ao %s %s", ci->bi->nick,
|
||||
ci->bi->nick);
|
||||
#elif defined(IRC_PTLINK)
|
||||
/* PTLinks requieres an IRCop to u-line changes, so use ChanServ */
|
||||
send_mode(s_ChanServ, ci->c->name, "+ao %s %s", ci->bi->nick,
|
||||
ci->bi->nick);
|
||||
#else
|
||||
send_mode(ci->bi->nick, ci->c->name, "+o %s", ci->bi->nick);
|
||||
#endif
|
||||
anope_cmd_join(ci->bi->nick, ci->c->name, ci->c->creation_time);
|
||||
anope_cmd_bot_chan_mode(ci->bi->nick, ci->c->name);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -1033,7 +1000,7 @@ static void check_ban(ChannelInfo * ci, User * u, int ttbtype)
|
||||
av[1] = sstrdup("+b");
|
||||
get_idealban(ci, u, mask, sizeof(mask));
|
||||
av[2] = mask;
|
||||
send_mode(ci->bi->nick, av[0], "+b %s", av[2]);
|
||||
anope_cmd_mode(ci->bi->nick, av[0], "+b %s", av[2]);
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
free(av[1]);
|
||||
}
|
||||
@@ -1062,7 +1029,7 @@ static void bot_kick(ChannelInfo * ci, User * u, int message, ...)
|
||||
av[0] = ci->name;
|
||||
av[1] = u->nick;
|
||||
av[2] = buf;
|
||||
send_cmd(ci->bi->nick, "KICK %s %s :%s", av[0], av[1], av[2]);
|
||||
anope_cmd_kick(ci->bi->nick, av[0], av[1], "%s", av[2]);
|
||||
do_kick(ci->bi->nick, 3, av);
|
||||
}
|
||||
|
||||
@@ -1080,31 +1047,31 @@ static void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
|
||||
if (!u)
|
||||
return;
|
||||
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
|
||||
if (is_protected(u) && (requester != u)) {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
if (ircd->protectedumode) {
|
||||
if (is_protected(u) && (requester != u)) {
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((ci->flags & CI_PEACE) && stricmp(requester->nick, nick)
|
||||
&& (get_access(u, ci) >= get_access(requester, ci)))
|
||||
return;
|
||||
|
||||
#ifdef HAS_EXCEPT
|
||||
if (is_excepted(ci, u) == 1) {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
getstring2(NULL, BOT_EXCEPT));
|
||||
return;
|
||||
if (ircd->except) {
|
||||
if (is_excepted(ci, u) == 1) {
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
getstring2(NULL, BOT_EXCEPT));
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
av[0] = ci->name;
|
||||
av[1] = sstrdup("+b");
|
||||
get_idealban(ci, u, mask, sizeof(mask));
|
||||
av[2] = mask;
|
||||
send_mode(ci->bi->nick, av[0], "+b %s", av[2]);
|
||||
anope_cmd_mode(ci->bi->nick, av[0], "+b %s", av[2]);
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
free(av[1]);
|
||||
|
||||
@@ -1119,7 +1086,7 @@ static void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
|
||||
av[2] = reason;
|
||||
}
|
||||
|
||||
send_cmd(ci->bi->nick, "KICK %s %s :%s", av[0], av[1], av[2]);
|
||||
anope_cmd_kick(ci->bi->nick, av[0], av[1], "%s", av[2]);
|
||||
do_kick(ci->bi->nick, 3, av);
|
||||
}
|
||||
|
||||
@@ -1136,13 +1103,13 @@ static void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick,
|
||||
if (!u || !is_on_chan(ci->c, u))
|
||||
return;
|
||||
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
|
||||
if (is_protected(u) && (requester != u)) {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
if (ircd->protectedumode) {
|
||||
if (is_protected(u) && (requester != u)) {
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((ci->flags & CI_PEACE) && stricmp(requester->nick, nick)
|
||||
&& (get_access(u, ci) >= get_access(requester, ci)))
|
||||
@@ -1159,7 +1126,7 @@ static void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick,
|
||||
av[2] = reason;
|
||||
}
|
||||
|
||||
send_cmd(ci->bi->nick, "KICK %s %s :%s", av[0], av[1], av[2]);
|
||||
anope_cmd_kick(ci->bi->nick, av[0], av[1], "%s", av[2]);
|
||||
do_kick(ci->bi->nick, 3, av);
|
||||
}
|
||||
|
||||
@@ -1176,13 +1143,13 @@ static void bot_raw_mode(User * requester, ChannelInfo * ci, char *mode,
|
||||
if (!u || !is_on_chan(ci->c, u))
|
||||
return;
|
||||
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
|
||||
if (is_protected(u) && *mode == '-' && (requester != u)) {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name,
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
if (ircd->protectedumode) {
|
||||
if (is_protected(u) && *mode == '-' && (requester != u)) {
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s",
|
||||
getstring2(NULL, PERMISSION_DENIED));
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (*mode == '-' && (ci->flags & CI_PEACE)
|
||||
&& stricmp(requester->nick, nick)
|
||||
@@ -1193,57 +1160,12 @@ static void bot_raw_mode(User * requester, ChannelInfo * ci, char *mode,
|
||||
av[1] = mode;
|
||||
av[2] = nick;
|
||||
|
||||
send_mode(ci->bi->nick, av[0], "%s %s", av[1], av[2]);
|
||||
anope_cmd_mode(ci->bi->nick, av[0], "%s %s", av[1], av[2]);
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Removes all bans for a nick on a channel */
|
||||
|
||||
static void bot_raw_unban(ChannelInfo * ci, char *nick)
|
||||
{
|
||||
#ifndef IRC_BAHAMUT
|
||||
int count, i;
|
||||
char *av[3], **bans;
|
||||
User *u;
|
||||
#endif
|
||||
|
||||
if (!ci || !ci->c || !ci->bi || !nick)
|
||||
return;
|
||||
#ifndef IRC_BAHAMUT
|
||||
if (!(u = finduser(nick)))
|
||||
return;
|
||||
#else
|
||||
if (!finduser(nick))
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifndef IRC_BAHAMUT
|
||||
av[0] = ci->name;
|
||||
av[1] = sstrdup("-b");
|
||||
|
||||
count = ci->c->bancount;
|
||||
bans = scalloc(sizeof(char *) * count, 1);
|
||||
memcpy(bans, ci->c->bans, sizeof(char *) * count);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (match_usermask(bans[i], u)) {
|
||||
send_mode(ci->bi->nick, ci->name, "-b %s", bans[i]);
|
||||
av[2] = bans[i];
|
||||
do_cmode(ci->bi->nick, 3, av);
|
||||
}
|
||||
}
|
||||
free(bans);
|
||||
free(av[1]);
|
||||
#else
|
||||
send_cmd(ServerName, "SVSMODE %s -b %s", ci->name, nick);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
static int do_help(User * u)
|
||||
{
|
||||
char *cmd = strtok(NULL, "");
|
||||
@@ -1383,8 +1305,8 @@ static int do_bot(User * u)
|
||||
EnforceQlinedNick(nick, s_BotServ);
|
||||
|
||||
/* We make the bot online, ready to serve */
|
||||
NEWNICK(bi->nick, bi->user, bi->host, bi->real,
|
||||
BOTSERV_BOTS_MODE, 1);
|
||||
anope_cmd_bot_nick(bi->nick, bi->user, bi->host, bi->real,
|
||||
ircd->botserv_bot_mode);
|
||||
|
||||
notice_lang(s_BotServ, u, BOT_BOT_ADDED, bi->nick, bi->user,
|
||||
bi->host, bi->real);
|
||||
@@ -1493,9 +1415,9 @@ static int do_bot(User * u)
|
||||
if (stricmp(bi->nick, nick)) {
|
||||
/* The new nick is really different, so we remove the Q line for
|
||||
the old nick. */
|
||||
#ifndef IRC_HYBRID
|
||||
send_cmd(NULL, "UNSQLINE %s", bi->nick);
|
||||
#endif
|
||||
if (ircd->sqline) {
|
||||
anope_cmd_unsqline(bi->nick);
|
||||
}
|
||||
|
||||
/* We check whether the nick is registered, and drop it if so */
|
||||
if ((na = findnick(nick)))
|
||||
@@ -1524,12 +1446,12 @@ static int do_bot(User * u)
|
||||
/* If only the nick changes, we just make the bot change his nick,
|
||||
else we must make it quit and rejoin. */
|
||||
if (!user)
|
||||
send_cmd(oldnick, "NICK %s", bi->nick);
|
||||
anope_cmd_chg_nick(oldnick, bi->nick);
|
||||
else {
|
||||
send_cmd(oldnick, "QUIT :Quit: Be right back");
|
||||
anope_cmd_quit(oldnick, "Quit: Be right back");
|
||||
|
||||
NEWNICK(bi->nick, bi->user, bi->host, bi->real,
|
||||
BOTSERV_BOTS_MODE, 1);
|
||||
anope_cmd_bot_nick(bi->nick, bi->user, bi->host, bi->real,
|
||||
ircd->botserv_bot_mode);
|
||||
bot_rejoin_all(bi);
|
||||
}
|
||||
|
||||
@@ -1546,12 +1468,12 @@ static int do_bot(User * u)
|
||||
else if (!(bi = findbot(nick)))
|
||||
notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST, nick);
|
||||
else {
|
||||
send_cmd(bi->nick,
|
||||
"QUIT :Quit: Help! I'm being deleted by %s!",
|
||||
u->nick);
|
||||
#ifndef IRC_HYBRID
|
||||
send_cmd(NULL, "UNSQLINE %s", bi->nick);
|
||||
#endif
|
||||
anope_cmd_quit(bi->nick,
|
||||
"Quit: Help! I'm being deleted by %s!",
|
||||
u->nick);
|
||||
if (ircd->sqline) {
|
||||
anope_cmd_unsqline(bi->nick);
|
||||
}
|
||||
delbot(bi);
|
||||
|
||||
notice_lang(s_BotServ, u, BOT_BOT_DELETED, nick);
|
||||
@@ -2494,11 +2416,12 @@ static int do_say(User * u)
|
||||
notice_lang(s_BotServ, u, ACCESS_DENIED);
|
||||
else {
|
||||
if (text[0] != '\001') {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%s", ci->name, text);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%s", text);
|
||||
ci->bi->lastmsg = time(NULL);
|
||||
if (logchan && LogBot)
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :SAY %s %s %s",
|
||||
LogChannel, u->nick, ci->name, text);
|
||||
anope_cmd_privmsg(ci->bi->nick, LogChannel,
|
||||
":SAY %s %s %s", u->nick, ci->name,
|
||||
text);
|
||||
} else {
|
||||
syntax_error(s_BotServ, u, "SAY", BOT_SAY_SYNTAX);
|
||||
}
|
||||
@@ -2528,12 +2451,12 @@ static int do_act(User * u)
|
||||
else if (!check_access(u, ci, CA_SAY))
|
||||
notice_lang(s_BotServ, u, ACCESS_DENIED);
|
||||
else {
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :%cACTION %s%c", ci->name, 1,
|
||||
text, 1);
|
||||
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s%c", 1,
|
||||
text, 1);
|
||||
ci->bi->lastmsg = time(NULL);
|
||||
if (logchan && LogBot)
|
||||
send_cmd(ci->bi->nick, "PRIVMSG %s :ACT %s %s %s", LogChannel,
|
||||
u->nick, ci->name, text);
|
||||
anope_cmd_privmsg(ci->bi->nick, LogChannel, ":ACT %s %s %s",
|
||||
u->nick, ci->name, text);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+109
-539
@@ -19,410 +19,24 @@ Channel *chanlist[1024];
|
||||
|
||||
#define HASH(chan) ((chan)[1] ? ((chan)[1]&31)<<5 | ((chan)[2]&31) : 0)
|
||||
|
||||
static void add_ban(Channel * chan, char *mask);
|
||||
#ifdef HAS_EXCEPT
|
||||
static void add_exception(Channel * chan, char *mask);
|
||||
#endif
|
||||
static void chan_adduser2(User * user, Channel * c);
|
||||
static Channel *chan_create(const char *chan);
|
||||
static void chan_delete(Channel * c);
|
||||
static void del_ban(Channel * chan, char *mask);
|
||||
#ifdef HAS_EXCEPT
|
||||
static void del_exception(Channel * chan, char *mask);
|
||||
#endif
|
||||
#ifdef HAS_FMODE
|
||||
static char *get_flood(Channel * chan);
|
||||
#endif
|
||||
static char *get_key(Channel * chan);
|
||||
static char *get_limit(Channel * chan);
|
||||
#ifdef HAS_LMODE
|
||||
static char *get_redirect(Channel * chan);
|
||||
#endif
|
||||
static Channel *join_user_update(User * user, Channel * chan, char *name);
|
||||
#ifdef HAS_FMODE
|
||||
static void set_flood(Channel * chan, char *value);
|
||||
#endif
|
||||
static void set_key(Channel * chan, char *value);
|
||||
static void set_limit(Channel * chan, char *value);
|
||||
#ifdef HAS_LMODE
|
||||
static void set_redirect(Channel * chan, char *value);
|
||||
#endif
|
||||
void add_ban(Channel * chan, char *mask);
|
||||
void add_exception(Channel * chan, char *mask);
|
||||
void chan_adduser2(User * user, Channel * c);
|
||||
Channel *chan_create(char *chan);
|
||||
void chan_delete(Channel * c);
|
||||
void del_ban(Channel * chan, char *mask);
|
||||
void del_exception(Channel * chan, char *mask);
|
||||
char *get_flood(Channel * chan);
|
||||
char *get_key(Channel * chan);
|
||||
char *get_limit(Channel * chan);
|
||||
char *get_redirect(Channel * chan);
|
||||
Channel *join_user_update(User * user, Channel * chan, char *name);
|
||||
void set_flood(Channel * chan, char *value);
|
||||
void set_key(Channel * chan, char *value);
|
||||
void set_limit(Channel * chan, char *value);
|
||||
void set_redirect(Channel * chan, char *value);
|
||||
void do_mass_mode(char *modes);
|
||||
|
||||
/*************************************************************************/
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
CBMode cbmodes[128] = {
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 },
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_RAGE2) || defined(IRC_VIAGRA)
|
||||
{ CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* A */
|
||||
#endif
|
||||
{ 0 }, /* B */
|
||||
#if defined(IRC_UNREAL) || defined(IRC_RAGE2)
|
||||
{ CMODE_C, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* C */
|
||||
#endif
|
||||
{ 0 }, /* D */
|
||||
{ 0 }, /* E */
|
||||
{ 0 }, /* F */
|
||||
#ifdef IRC_UNREAL
|
||||
{ CMODE_G, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* G */
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
{ CMODE_H, CBM_NO_USER_MLOCK, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* H */
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE
|
||||
{ CMODE_I },
|
||||
#else
|
||||
{ 0 }, /* I */
|
||||
#endif
|
||||
{ 0 }, /* J */
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3) || defined(IRC_UNREAL)
|
||||
{ CMODE_K, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* K */
|
||||
#endif
|
||||
#ifdef HAS_LMODE
|
||||
{ CMODE_L, 0, set_redirect, cs_set_redirect },
|
||||
#else
|
||||
{ 0 }, /* L */
|
||||
#endif
|
||||
#ifdef IRC_BAHAMUT
|
||||
{ CMODE_M },
|
||||
#else
|
||||
{ 0 }, /* M */
|
||||
#endif
|
||||
#if defined (IRC_UNREAL) || defined (IRC_ULTIMATE3) || defined (IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
{ CMODE_N, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* N */
|
||||
#endif
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
{ CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* O */
|
||||
#endif
|
||||
{ 0 }, /* P */
|
||||
#ifdef IRC_UNREAL
|
||||
{ CMODE_Q, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* Q */
|
||||
#endif
|
||||
#ifndef IRC_HYBRID
|
||||
{ CMODE_R, 0, NULL, NULL }, /* R */
|
||||
#else
|
||||
{ 0 },
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined (IRC_ULTIMATE3) || defined (IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
{ CMODE_S, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* S */
|
||||
#endif
|
||||
{ 0 }, /* T */
|
||||
{ 0 }, /* U */
|
||||
#ifdef IRC_UNREAL
|
||||
{ CMODE_V, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* V */
|
||||
#endif
|
||||
{ 0 }, /* W */
|
||||
{ 0 }, /* X */
|
||||
{ 0 }, /* Y */
|
||||
{ 0 }, /* Z */
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
#ifdef IRC_HYBRID
|
||||
{ CMODE_a, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* a */
|
||||
#endif
|
||||
{ 0 }, /* b */
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_UNREAL) || defined (IRC_PTLINK)
|
||||
{ CMODE_c, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* c */
|
||||
#endif
|
||||
#ifdef IRC_PTLINK
|
||||
{ CMODE_d, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* d */
|
||||
#endif
|
||||
{ 0 }, /* e */
|
||||
#ifdef HAS_FMODE
|
||||
{ CMODE_f, 0, set_flood, cs_set_flood },
|
||||
#else
|
||||
{ 0 }, /* f */
|
||||
#endif
|
||||
{ 0 }, /* g */
|
||||
{ 0 }, /* h */
|
||||
{ CMODE_i, 0, NULL, NULL },
|
||||
{ 0 }, /* j */
|
||||
{ CMODE_k, 0, set_key, cs_set_key },
|
||||
{ CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit },
|
||||
{ CMODE_m, 0, NULL, NULL },
|
||||
{ CMODE_n, 0, NULL, NULL },
|
||||
{ 0 }, /* o */
|
||||
{ CMODE_p, 0, NULL, NULL },
|
||||
#ifdef IRC_PTLINK
|
||||
{ CMODE_q, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* q */
|
||||
#endif
|
||||
#ifndef IRC_HYBRID
|
||||
{ CMODE_r, CBM_NO_MLOCK, NULL, NULL },
|
||||
#else
|
||||
{ 0 },
|
||||
#endif
|
||||
{ CMODE_s, 0, NULL, NULL },
|
||||
{ CMODE_t, 0, NULL, NULL },
|
||||
#ifdef IRC_UNREAL
|
||||
{ CMODE_u, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 },
|
||||
#endif
|
||||
{ 0 }, /* v */
|
||||
{ 0 }, /* w */
|
||||
#ifdef IRC_ULTIMATE
|
||||
{ CMODE_x },
|
||||
#else
|
||||
{ 0 }, /* x */
|
||||
#endif
|
||||
{ 0 }, /* y */
|
||||
#ifdef IRC_UNREAL
|
||||
{ CMODE_z, 0, NULL, NULL },
|
||||
#else
|
||||
{ 0 }, /* z */
|
||||
#endif
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }
|
||||
};
|
||||
|
||||
CBModeInfo cbmodeinfos[] = {
|
||||
#if defined(IRC_HYBRID)
|
||||
{ 'a', CMODE_a, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_UNREAL) || defined(IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
{ 'c', CMODE_c, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_PTLINK)
|
||||
{ 'd', CMODE_d, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef HAS_FMODE
|
||||
{ 'f', CMODE_f, 0, get_flood, cs_get_flood },
|
||||
#endif
|
||||
{ 'i', CMODE_i, 0, NULL, NULL },
|
||||
{ 'k', CMODE_k, 0, get_key, cs_get_key },
|
||||
{ 'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit },
|
||||
{ 'm', CMODE_m, 0, NULL, NULL },
|
||||
{ 'n', CMODE_n, 0, NULL, NULL },
|
||||
{ 'p', CMODE_p, 0, NULL, NULL },
|
||||
#ifdef IRC_PTLINK
|
||||
{ 'q', CMODE_q, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifndef IRC_HYBRID
|
||||
{ 'r', CMODE_r, 0, NULL, NULL },
|
||||
#endif
|
||||
{ 's', CMODE_s, 0, NULL, NULL },
|
||||
{ 't', CMODE_t, 0, NULL, NULL },
|
||||
#ifdef IRC_UNREAL
|
||||
{ 'u', CMODE_u, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE
|
||||
{ 'x', CMODE_x, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_UNREAL
|
||||
{ 'z', CMODE_z, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_PTLINK) || defined(IRC_RAGE2) || defined(IRC_VIAGRA)
|
||||
{ 'A', CMODE_A, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_RAGE2)
|
||||
{ 'C', CMODE_C, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_UNREAL
|
||||
{ 'G', CMODE_G, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
{ 'H', CMODE_H, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE
|
||||
{ 'I', CMODE_I, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_PTLINK) || defined(IRC_ULTIMATE3)
|
||||
{ 'K', CMODE_K, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef HAS_LMODE
|
||||
{ 'L', CMODE_L, 0, get_redirect, cs_get_redirect },
|
||||
#endif
|
||||
#ifdef IRC_BAHAMUT
|
||||
#ifndef IRC_ULTIMATE3
|
||||
{ 'M', CMODE_M, 0, NULL, NULL },
|
||||
#endif
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
{ 'N', CMODE_N, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
{ 'O', CMODE_O, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_UNREAL
|
||||
{ 'Q', CMODE_Q, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifndef IRC_HYBRID
|
||||
{ 'R', CMODE_R, 0, NULL, NULL },
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3) || defined(IRC_PTLINK) || defined(IRC_RAGE2)
|
||||
{ 'S', CMODE_S, 0, NULL, NULL },
|
||||
#endif
|
||||
#ifdef IRC_UNREAL
|
||||
{ 'V', CMODE_V, 0, NULL, NULL },
|
||||
#endif
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static CMMode cmmodes[128] = {
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL },
|
||||
{ NULL },
|
||||
{ add_ban, del_ban },
|
||||
{ NULL },
|
||||
{ NULL },
|
||||
#ifdef HAS_EXCEPT
|
||||
{ add_exception, del_exception },
|
||||
#endif
|
||||
{ NULL },
|
||||
{ NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL },
|
||||
{ NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }, { NULL }
|
||||
};
|
||||
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_HYBRID) || defined(IRC_PTLINK)
|
||||
|
||||
static char csmodes[128] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
0,
|
||||
#if defined(IRC_ULTIMATE3) || defined(IRC_HYBRID)
|
||||
'a', /* (33) ! Channel Admins */
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
0, 0, 0,
|
||||
#if defined(IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
'h', /* (37) % Channel halfops */
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
0, 0, 0, 0,
|
||||
#if defined(IRC_RAGE2)
|
||||
'a', /* * Channel Admins */
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
|
||||
'v', 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static CUMode cumodes[128] = {
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ 0 },
|
||||
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
{ CUS_PROTECT, CUF_PROTECT_BOTSERV, check_valid_op },
|
||||
#else
|
||||
#if defined(IRC_ULTIMATE3) || defined(IRC_RAGE2)
|
||||
{ CUS_PROTECT, CUF_PROTECT_BOTSERV, check_valid_admin },
|
||||
#else
|
||||
{ 0 }, /* a */
|
||||
#endif
|
||||
#endif
|
||||
{ 0 }, /* b */
|
||||
{ 0 }, /* c */
|
||||
{ 0 }, /* d */
|
||||
{ 0 }, /* e */
|
||||
{ 0 }, /* f */
|
||||
{ 0 }, /* g */
|
||||
#ifdef HAS_HALFOP
|
||||
{ CUS_HALFOP, 0, check_valid_op },
|
||||
#else
|
||||
{ 0 }, /* h */
|
||||
#endif
|
||||
{ 0 }, /* i */
|
||||
{ 0 }, /* j */
|
||||
{ 0 }, /* k */
|
||||
{ 0 }, /* l */
|
||||
{ 0 }, /* m */
|
||||
{ 0 }, /* n */
|
||||
{ CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op },
|
||||
{ 0 }, /* p */
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
{ CUS_OWNER, 0, check_valid_op },
|
||||
#else
|
||||
{ 0 }, /* q */
|
||||
#endif
|
||||
{ 0 }, /* r */
|
||||
{ 0 }, /* s */
|
||||
{ 0 }, /* t */
|
||||
{ 0 }, /* u */
|
||||
{ CUS_VOICE, 0, NULL },
|
||||
{ 0 }, /* w */
|
||||
{ 0 }, /* x */
|
||||
{ 0 }, /* y */
|
||||
{ 0 }, /* z */
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }
|
||||
};
|
||||
|
||||
/* *INDENT-ON* */
|
||||
/*************************************************************************/
|
||||
/**************************** External Calls *****************************/
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -453,7 +67,7 @@ void chan_deluser(User * user, Channel * c)
|
||||
c->usercount--;
|
||||
|
||||
if (s_BotServ && c->ci && c->ci->bi && c->usercount == BSMinUsers - 1) {
|
||||
send_cmd(c->ci->bi->nick, "PART %s", c->name);
|
||||
anope_cmd_part(c->ci->bi->nick, c->name, NULL);
|
||||
}
|
||||
|
||||
if (!c->users)
|
||||
@@ -598,8 +212,8 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av,
|
||||
BotInfo *bi;
|
||||
|
||||
if ((bi = findbot(*av))) {
|
||||
send_mode(bi->nick, chan->name, "+%c %s", mode,
|
||||
bi->nick);
|
||||
anope_cmd_mode(bi->nick, chan->name, "+%c %s", mode,
|
||||
bi->nick);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -665,7 +279,7 @@ void chan_set_user_status(Channel * chan, User * user, int16 status)
|
||||
|
||||
if (HelpChannel && status == CUS_OP
|
||||
&& !stricmp(chan->name, HelpChannel))
|
||||
change_user_mode(user, "+h", NULL);
|
||||
common_svsmode(user, "+h", NULL);
|
||||
|
||||
for (uc = user->chans; uc; uc = uc->next) {
|
||||
if (uc->chan == chan) {
|
||||
@@ -752,26 +366,26 @@ void get_channel_stats(long *nrec, long *memuse)
|
||||
mem += strlen(chan->topic) + 1;
|
||||
if (chan->key)
|
||||
mem += strlen(chan->key) + 1;
|
||||
#ifdef HAS_FMODE
|
||||
if (chan->flood)
|
||||
mem += strlen(chan->flood) + 1;
|
||||
#endif
|
||||
#ifdef HAS_LMODE
|
||||
if (chan->redirect)
|
||||
mem += strlen(chan->redirect) + 1;
|
||||
#endif
|
||||
if (ircd->fmode) {
|
||||
if (chan->flood)
|
||||
mem += strlen(chan->flood) + 1;
|
||||
}
|
||||
if (ircd->Lmode) {
|
||||
if (chan->redirect)
|
||||
mem += strlen(chan->redirect) + 1;
|
||||
}
|
||||
mem += sizeof(char *) * chan->bansize;
|
||||
for (j = 0; j < chan->bancount; j++) {
|
||||
if (chan->bans[j])
|
||||
mem += strlen(chan->bans[j]) + 1;
|
||||
}
|
||||
#ifdef HAS_EXCEPT
|
||||
mem += sizeof(char *) * chan->exceptsize;
|
||||
for (j = 0; j < chan->exceptcount; j++) {
|
||||
if (chan->excepts[j])
|
||||
mem += strlen(chan->excepts[j]) + 1;
|
||||
if (ircd->except) {
|
||||
mem += sizeof(char *) * chan->exceptsize;
|
||||
for (j = 0; j < chan->exceptcount; j++) {
|
||||
if (chan->excepts[j])
|
||||
mem += strlen(chan->excepts[j]) + 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (cu = chan->users; cu; cu = cu->next) {
|
||||
mem += sizeof(*cu);
|
||||
if (cu->ud) {
|
||||
@@ -986,8 +600,6 @@ void do_part(const char *source, int ac, char **av)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#if defined(IRC_BAHAMUT) || defined(IRC_HYBRID) || defined(IRC_PTLINK)
|
||||
|
||||
/* Handle a SJOIN command.
|
||||
|
||||
On channel creation, syntax is:
|
||||
@@ -1013,16 +625,15 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
|
||||
/* Double check to avoid unknown modes that need parameters */
|
||||
if (ac >= 4 && ac <= 6) {
|
||||
char *s, *end, cubuf[CHAN_MAX_SYMBOLS + 2], *end2,
|
||||
*cumodes[CHAN_MAX_SYMBOLS + 1];
|
||||
char *s, *end, cubuf[ircd->max_symbols + 2], *end2,
|
||||
*cumodes[ircd->max_symbols + 1];
|
||||
|
||||
c = findchan(av[1]);
|
||||
#ifndef IRC_HYBRID
|
||||
#ifndef IRC_PTLINK
|
||||
if (!c)
|
||||
is_sqlined = check_chan_sqline(av[1]);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (ircd->chansqline) {
|
||||
if (!c)
|
||||
is_sqlined = check_chan_sqline(av[1]);
|
||||
}
|
||||
|
||||
cubuf[0] = '+';
|
||||
cumodes[0] = cubuf;
|
||||
@@ -1048,7 +659,7 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
send_cmd(s_OperServ, "KICK %s %s :Q-Lined", av[1], s);
|
||||
anope_cmd_kick(s_OperServ, av[1], s, "Q-Lined");
|
||||
} else {
|
||||
if (!check_kick(user, av[1])) {
|
||||
/* Make the user join; if the channel does not exist it
|
||||
@@ -1094,14 +705,13 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
return;
|
||||
|
||||
c = findchan(av[1]);
|
||||
#ifndef IRC_HYBRID
|
||||
#ifndef IRC_PTLINK
|
||||
if (!c)
|
||||
is_sqlined = check_chan_sqline(av[1]);
|
||||
#endif
|
||||
#endif
|
||||
if (ircd->chansqline) {
|
||||
if (!c)
|
||||
is_sqlined = check_chan_sqline(av[1]);
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
send_cmd(s_OperServ, "KICK %s %s :Q-Lined", av[1], user->nick);
|
||||
anope_cmd_kick(s_OperServ, av[1], user->nick, "Q-Lined");
|
||||
} else {
|
||||
c = join_user_update(user, c, av[1]);
|
||||
c->creation_time = strtoul(av[0], NULL, 10);
|
||||
@@ -1109,7 +719,6 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -1119,34 +728,29 @@ void do_cmode(const char *source, int ac, char **av)
|
||||
{
|
||||
Channel *chan;
|
||||
ChannelInfo *ci = NULL;
|
||||
#ifdef IRC_BAHAMUT
|
||||
|
||||
/* Ultimate3 doesn't send TS on Mode - TSL */
|
||||
#if !defined(IRC_ULTIMATE3)
|
||||
int i;
|
||||
char *t;
|
||||
|
||||
/* TSMODE for bahamut - leave this code out to break MODEs. -GD */
|
||||
if (uplink_capab & CAPAB_TSMODE) {
|
||||
for (i = 0; i < strlen(av[1]); i++) {
|
||||
if (!isdigit(av[1][i]))
|
||||
break;
|
||||
}
|
||||
if (av[1][i] == '\0') {
|
||||
/* We have a valid TS field in av[1] now, so we can strip it off */
|
||||
/* After we swap av[0] and av[1] ofcourse to not break stuff! :) */
|
||||
t = av[0];
|
||||
av[0] = av[1];
|
||||
av[1] = t;
|
||||
ac--;
|
||||
av++;
|
||||
} else {
|
||||
alog("TSMODE enabled but MODE has no valid TS");
|
||||
if (ircdcap->tsmode) {
|
||||
/* TSMODE for bahamut - leave this code out to break MODEs. -GD */
|
||||
if (uplink_capab & ircdcap->tsmode) {
|
||||
for (i = 0; i < strlen(av[1]); i++) {
|
||||
if (!isdigit(av[1][i]))
|
||||
break;
|
||||
}
|
||||
if (av[1][i] == '\0') {
|
||||
/* We have a valid TS field in av[1] now, so we can strip it off */
|
||||
/* After we swap av[0] and av[1] ofcourse to not break stuff! :) */
|
||||
t = av[0];
|
||||
av[0] = av[1];
|
||||
av[1] = t;
|
||||
ac--;
|
||||
av++;
|
||||
} else {
|
||||
alog("TSMODE enabled but MODE has no valid TS");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
chan = findchan(av[0]);
|
||||
if (!chan) {
|
||||
@@ -1206,7 +810,7 @@ void do_topic(const char *source, int ac, char **av)
|
||||
/**************************** Internal Calls *****************************/
|
||||
/*************************************************************************/
|
||||
|
||||
static void add_ban(Channel * chan, char *mask)
|
||||
void add_ban(Channel * chan, char *mask)
|
||||
{
|
||||
if (s_BotServ && BSSmartJoin && chan->ci && chan->ci->bi
|
||||
&& chan->usercount >= BSMinUsers) {
|
||||
@@ -1216,7 +820,7 @@ static void add_ban(Channel * chan, char *mask)
|
||||
snprintf(botmask, sizeof(botmask), "%s!%s@%s", bi->nick, bi->user,
|
||||
bi->host);
|
||||
if (match_wild_nocase(mask, botmask)) {
|
||||
send_mode(bi->nick, chan->name, "-b %s", mask);
|
||||
anope_cmd_mode(bi->nick, chan->name, "-b %s", mask);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1233,9 +837,7 @@ static void add_ban(Channel * chan, char *mask)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_EXCEPT
|
||||
|
||||
static void add_exception(Channel * chan, char *mask)
|
||||
void add_exception(Channel * chan, char *mask)
|
||||
{
|
||||
if (chan->exceptcount >= chan->exceptsize) {
|
||||
chan->exceptsize += 8;
|
||||
@@ -1248,8 +850,6 @@ static void add_exception(Channel * chan, char *mask)
|
||||
alog("debug: Added except %s to channel %s", mask, chan->name);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Add/remove a user to/from a channel, creating or deleting the channel as
|
||||
@@ -1258,32 +858,22 @@ static void add_exception(Channel * chan, char *mask)
|
||||
* Modified, so ignored users won't get any status via services -certus */
|
||||
|
||||
|
||||
static void chan_adduser2(User * user, Channel * c)
|
||||
void chan_adduser2(User * user, Channel * c)
|
||||
{
|
||||
struct c_userlist *u;
|
||||
char *chan = c->name;
|
||||
|
||||
if (get_ignore(user->nick) == NULL) {
|
||||
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA)
|
||||
if (check_should_owner(user, chan)) {
|
||||
if (ircd->owner && check_should_owner(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_OWNER | CUS_OP);
|
||||
} else
|
||||
#endif
|
||||
#if defined(IRC_UNREAL) || defined(IRC_VIAGRA) || defined(IRC_ULTIMATE3) || defined(IRC_RAGE2) || defined(IRC_PTLINK)
|
||||
if (check_should_protect(user, chan)) {
|
||||
} else if (ircd->protect && check_should_protect(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_PROTECT | CUS_OP);
|
||||
} else
|
||||
#endif
|
||||
if (check_should_op(user, chan)) {
|
||||
} else if (check_should_op(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_OP);
|
||||
} else
|
||||
#ifdef HAS_HALFOP
|
||||
if (check_should_halfop(user, chan)) {
|
||||
} else if (ircd->halfop && check_should_halfop(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_HALFOP);
|
||||
} else
|
||||
#endif
|
||||
if (check_should_voice(user, chan)) {
|
||||
} else if (check_should_voice(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_VOICE);
|
||||
}
|
||||
}
|
||||
@@ -1323,8 +913,8 @@ static void chan_adduser2(User * user, Channel * c)
|
||||
if (c->usercount >= BSMinUsers && (c->ci->botflags & BS_GREET)
|
||||
&& user->na && user->na->nc->greet
|
||||
&& check_access(user, c->ci, CA_GREET)) {
|
||||
send_cmd(c->ci->bi->nick, "PRIVMSG %s :[%s] %s", c->name,
|
||||
user->na->nick, user->na->nc->greet);
|
||||
anope_cmd_privmsg(c->ci->bi->nick, c->name, "[%s] %s",
|
||||
user->na->nick, user->na->nc->greet);
|
||||
c->ci->bi->lastmsg = time(NULL);
|
||||
}
|
||||
}
|
||||
@@ -1336,7 +926,7 @@ static void chan_adduser2(User * user, Channel * c)
|
||||
chan_adduser, but splitted to make it more efficient to use for
|
||||
SJOINs). */
|
||||
|
||||
static Channel *chan_create(const char *chan)
|
||||
Channel *chan_create(char *chan)
|
||||
{
|
||||
Channel *c;
|
||||
Channel **list;
|
||||
@@ -1370,7 +960,7 @@ static Channel *chan_create(const char *chan)
|
||||
|
||||
/* This destroys the channel structure, freeing everything in it. */
|
||||
|
||||
static void chan_delete(Channel * c)
|
||||
void chan_delete(Channel * c)
|
||||
{
|
||||
BanData *bd, *next;
|
||||
int i;
|
||||
@@ -1393,14 +983,14 @@ static void chan_delete(Channel * c)
|
||||
|
||||
if (c->key)
|
||||
free(c->key);
|
||||
#ifdef HAS_FMODE
|
||||
if (c->flood)
|
||||
free(c->flood);
|
||||
#endif
|
||||
#ifdef HAS_LMODE
|
||||
if (c->redirect)
|
||||
free(c->redirect);
|
||||
#endif
|
||||
if (ircd->fmode) {
|
||||
if (c->flood)
|
||||
free(c->flood);
|
||||
}
|
||||
if (ircd->Lmode) {
|
||||
if (c->redirect)
|
||||
free(c->redirect);
|
||||
}
|
||||
|
||||
for (i = 0; i < c->bancount; ++i) {
|
||||
if (c->bans[i])
|
||||
@@ -1411,17 +1001,17 @@ static void chan_delete(Channel * c)
|
||||
if (c->bansize)
|
||||
free(c->bans);
|
||||
|
||||
#ifdef HAS_EXCEPT
|
||||
for (i = 0; i < c->exceptcount; ++i) {
|
||||
if (c->excepts[i])
|
||||
free(c->excepts[i]);
|
||||
else
|
||||
alog("channel: BUG freeing %s: exceps[%d] is NULL!", c->name,
|
||||
i);
|
||||
if (ircd->except) {
|
||||
for (i = 0; i < c->exceptcount; ++i) {
|
||||
if (c->excepts[i])
|
||||
free(c->excepts[i]);
|
||||
else
|
||||
alog("channel: BUG freeing %s: exceps[%d] is NULL!",
|
||||
c->name, i);
|
||||
}
|
||||
if (c->exceptsize)
|
||||
free(c->excepts);
|
||||
}
|
||||
if (c->exceptsize)
|
||||
free(c->excepts);
|
||||
#endif
|
||||
|
||||
if (c->next)
|
||||
c->next->prev = c->prev;
|
||||
@@ -1435,7 +1025,7 @@ static void chan_delete(Channel * c)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static void del_ban(Channel * chan, char *mask)
|
||||
void del_ban(Channel * chan, char *mask)
|
||||
{
|
||||
char **s = chan->bans;
|
||||
int i = 0;
|
||||
@@ -1462,9 +1052,7 @@ static void del_ban(Channel * chan, char *mask)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_EXCEPT
|
||||
|
||||
static void del_exception(Channel * chan, char *mask)
|
||||
void del_exception(Channel * chan, char *mask)
|
||||
{
|
||||
int i;
|
||||
int reset = 0;
|
||||
@@ -1486,29 +1074,23 @@ static void del_exception(Channel * chan, char *mask)
|
||||
alog("debug: Deleted except %s to channel %s", mask, chan->name);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_FMODE
|
||||
|
||||
static char *get_flood(Channel * chan)
|
||||
char *get_flood(Channel * chan)
|
||||
{
|
||||
return chan->flood;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static char *get_key(Channel * chan)
|
||||
char *get_key(Channel * chan)
|
||||
{
|
||||
return chan->key;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static char *get_limit(Channel * chan)
|
||||
char *get_limit(Channel * chan)
|
||||
{
|
||||
static char limit[16];
|
||||
|
||||
@@ -1521,18 +1103,14 @@ static char *get_limit(Channel * chan)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_LMODE
|
||||
|
||||
static char *get_redirect(Channel * chan)
|
||||
char *get_redirect(Channel * chan)
|
||||
{
|
||||
return chan->redirect;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static Channel *join_user_update(User * user, Channel * chan, char *name)
|
||||
Channel *join_user_update(User * user, Channel * chan, char *name)
|
||||
{
|
||||
struct u_chanlist *c;
|
||||
|
||||
@@ -1557,9 +1135,7 @@ static Channel *join_user_update(User * user, Channel * chan, char *name)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_FMODE
|
||||
|
||||
static void set_flood(Channel * chan, char *value)
|
||||
void set_flood(Channel * chan, char *value)
|
||||
{
|
||||
if (chan->flood)
|
||||
free(chan->flood);
|
||||
@@ -1570,11 +1146,9 @@ static void set_flood(Channel * chan, char *value)
|
||||
chan->flood ? chan->flood : "no flood settings");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static void set_key(Channel * chan, char *value)
|
||||
void set_key(Channel * chan, char *value)
|
||||
{
|
||||
if (chan->key)
|
||||
free(chan->key);
|
||||
@@ -1587,7 +1161,7 @@ static void set_key(Channel * chan, char *value)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static void set_limit(Channel * chan, char *value)
|
||||
void set_limit(Channel * chan, char *value)
|
||||
{
|
||||
chan->limit = value ? strtoul(value, NULL, 10) : 0;
|
||||
|
||||
@@ -1598,9 +1172,7 @@ static void set_limit(Channel * chan, char *value)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef HAS_LMODE
|
||||
|
||||
static void set_redirect(Channel * chan, char *value)
|
||||
void set_redirect(Channel * chan, char *value)
|
||||
{
|
||||
if (chan->redirect)
|
||||
free(chan->redirect);
|
||||
@@ -1611,8 +1183,6 @@ static void set_redirect(Channel * chan, char *value)
|
||||
chan->redirect ? chan->redirect : "no redirect");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void do_mass_mode(char *modes)
|
||||
{
|
||||
int ac, i;
|
||||
@@ -1633,7 +1203,7 @@ void do_mass_mode(char *modes)
|
||||
if (c->bouncy_modes) {
|
||||
return;
|
||||
} else {
|
||||
send_mode(s_OperServ, c->name, "%s", modes);
|
||||
anope_cmd_mode(s_OperServ, c->name, "%s", modes);
|
||||
chan_set_modes(s_OperServ, c, ac, av, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+390
-549
File diff suppressed because it is too large
Load Diff
+7
-11
@@ -22,7 +22,7 @@
|
||||
* command exists.
|
||||
*/
|
||||
|
||||
Command *lookup_cmd(Command * list, const char *cmd)
|
||||
Command *lookup_cmd(Command * list, char *cmd)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
@@ -39,22 +39,20 @@ Command *lookup_cmd(Command * list, const char *cmd)
|
||||
* privilege to do so; if not, print an appropriate error message.
|
||||
*/
|
||||
|
||||
void run_cmd(const char *service, User * u, Command * list,
|
||||
const char *cmd)
|
||||
void run_cmd(char *service, User * u, Command * list, char *cmd)
|
||||
{
|
||||
Command *c = lookup_cmd(list, cmd);
|
||||
do_run_cmd(service, u, c, cmd);
|
||||
}
|
||||
|
||||
void mod_run_cmd(const char *service, User * u, CommandHash * cmdTable[],
|
||||
void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[],
|
||||
const char *cmd)
|
||||
{
|
||||
Command *c = findCommand(cmdTable, cmd);
|
||||
do_run_cmd(service, u, c, cmd);
|
||||
}
|
||||
|
||||
void do_run_cmd(const char *service, User * u, Command * c,
|
||||
const char *cmd)
|
||||
void do_run_cmd(char *service, User * u, Command * c, const char *cmd)
|
||||
{
|
||||
int retVal = 0;
|
||||
Command *current;
|
||||
@@ -97,8 +95,7 @@ void do_run_cmd(const char *service, User * u, Command * c,
|
||||
|
||||
/* Print a help message for the given command. */
|
||||
|
||||
void do_help_cmd(const char *service, User * u, Command * c,
|
||||
const char *cmd)
|
||||
void do_help_cmd(char *service, User * u, Command * c, const char *cmd)
|
||||
{
|
||||
Command *current;
|
||||
int has_had_help = 0;
|
||||
@@ -161,14 +158,13 @@ void do_help_cmd(const char *service, User * u, Command * c,
|
||||
}
|
||||
}
|
||||
|
||||
void help_cmd(const char *service, User * u, Command * list,
|
||||
const char *cmd)
|
||||
void help_cmd(char *service, User * u, Command * list, char *cmd)
|
||||
{
|
||||
Command *c = lookup_cmd(list, cmd);
|
||||
do_help_cmd(service, u, c, cmd);
|
||||
}
|
||||
|
||||
void mod_help_cmd(const char *service, User * u, CommandHash * cmdTable[],
|
||||
void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[],
|
||||
const char *cmd)
|
||||
{
|
||||
Command *c = findCommand(cmdTable, cmd);
|
||||
|
||||
+6
-5
@@ -144,8 +144,8 @@ static dbFILE *open_db_write(const char *service, const char *filename,
|
||||
static int walloped = 0;
|
||||
if (!walloped) {
|
||||
walloped++;
|
||||
wallops(NULL, "Can't back up %s database %s", service,
|
||||
filename);
|
||||
anope_cmd_global(NULL, "Can't back up %s database %s", service,
|
||||
filename);
|
||||
}
|
||||
errno = errno_save;
|
||||
log_perror("Can't back up %s database %s", service, filename);
|
||||
@@ -171,8 +171,8 @@ static dbFILE *open_db_write(const char *service, const char *filename,
|
||||
static int walloped = 0;
|
||||
if (!walloped) {
|
||||
walloped++;
|
||||
wallops(NULL, "Can't write to %s database %s", service,
|
||||
filename);
|
||||
anope_cmd_global(NULL, "Can't write to %s database %s",
|
||||
service, filename);
|
||||
}
|
||||
errno = errno_save;
|
||||
log_perror("Can't write to %s database %s", service, filename);
|
||||
@@ -424,7 +424,8 @@ static void rename_database(char *name, char *ext)
|
||||
snprintf(destpath, sizeof(destpath), "backups/%s.%s", name, ext);
|
||||
if (rename(name, destpath) != 0) {
|
||||
alog("Backup of %s failed.", name);
|
||||
wallops(s_OperServ, "WARNING! Backup of %s failed.", name);
|
||||
anope_cmd_global(s_OperServ, "WARNING! Backup of %s failed.",
|
||||
name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1123
File diff suppressed because it is too large
Load Diff
+47
-110
@@ -33,9 +33,6 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick,
|
||||
HostCore *deleteHostCore(HostCore * head, HostCore * prev);
|
||||
void delHostCore(char *nick);
|
||||
|
||||
static void send_on(char *nick, char *vIdent, char *vhost);
|
||||
static void send_off(User * u);
|
||||
|
||||
char *getvIdent(char *nick);
|
||||
char *getvHost(char *nick);
|
||||
|
||||
@@ -112,11 +109,11 @@ void hostserv(User * u, char *buf)
|
||||
} else if (skeleton) {
|
||||
notice_lang(s_HostServ, u, SERVICE_OFFLINE, s_HostServ);
|
||||
} else {
|
||||
#ifdef HAS_VHOST
|
||||
mod_run_cmd(s_HostServ, u, HOSTSERV, cmd);
|
||||
#else
|
||||
notice_lang(s_HostServ, u, SERVICE_OFFLINE, s_HostServ);
|
||||
#endif
|
||||
if (ircd->vhost) {
|
||||
mod_run_cmd(s_HostServ, u, HOSTSERV, cmd);
|
||||
} else {
|
||||
notice_lang(s_HostServ, u, SERVICE_OFFLINE, s_HostServ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,8 +126,8 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
|
||||
|
||||
next = malloc(sizeof(HostCore));
|
||||
if (next == NULL) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
} else {
|
||||
next->nick = malloc(sizeof(char) * strlen(nick) + 1);
|
||||
next->vHost = malloc(sizeof(char) * strlen(vHost) + 1);
|
||||
@@ -139,8 +136,8 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
|
||||
next->vIdent = malloc(sizeof(char) * strlen(vIdent) + 1);
|
||||
if ((next->nick == NULL) || (next->vHost == NULL)
|
||||
|| (next->creator == NULL)) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
strcpy(next->nick, nick);
|
||||
@@ -148,8 +145,8 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
|
||||
strcpy(next->creator, creator);
|
||||
if (vIdent) {
|
||||
if ((next->vIdent == NULL)) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
strcpy(next->vIdent, vIdent);
|
||||
@@ -208,8 +205,8 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick,
|
||||
|
||||
newCore = malloc(sizeof(HostCore));
|
||||
if (newCore == NULL) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to insert into the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to insert into the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
} else {
|
||||
newCore->nick = malloc(sizeof(char) * strlen(nick) + 1);
|
||||
@@ -219,8 +216,8 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick,
|
||||
newCore->vIdent = malloc(sizeof(char) * strlen(vIdent) + 1);
|
||||
if ((newCore->nick == NULL) || (newCore->vHost == NULL)
|
||||
|| (newCore->creator == NULL)) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
strcpy(newCore->nick, nick);
|
||||
@@ -228,8 +225,8 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick,
|
||||
strcpy(newCore->creator, creator);
|
||||
if (vIdent) {
|
||||
if ((newCore->vIdent == NULL)) {
|
||||
wallops(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
anope_cmd_global(s_HostServ,
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
strcpy(newCore->vIdent, vIdent);
|
||||
@@ -589,7 +586,7 @@ void load_hs_dbase_v3(dbFILE * f)
|
||||
restore_db(f); \
|
||||
log_perror("Write error on %s", HostDBName); \
|
||||
if (time(NULL) - lastwarn > WarningTimeout) { \
|
||||
wallops(NULL, "Write error on %s: %s", HostDBName, \
|
||||
anope_cmd_global(NULL, "Write error on %s: %s", HostDBName, \
|
||||
strerror(errno)); \
|
||||
lastwarn = time(NULL); \
|
||||
} \
|
||||
@@ -684,10 +681,10 @@ int do_setall(User * u)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef HAS_VIDENT
|
||||
notice_lang(s_HostServ, u, HOST_NO_VIDENT);
|
||||
return MOD_CONT;
|
||||
#endif
|
||||
if (!ircd->vident) {
|
||||
notice_lang(s_HostServ, u, HOST_NO_VIDENT);
|
||||
return MOD_CONT;
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen(rawhostmask) < HOSTMAX - 1)
|
||||
@@ -863,10 +860,10 @@ int do_set(User * u)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef HAS_VIDENT
|
||||
notice_lang(s_HostServ, u, HOST_NO_VIDENT);
|
||||
return MOD_CONT;
|
||||
#endif
|
||||
if (!ircd->vident) {
|
||||
notice_lang(s_HostServ, u, HOST_NO_VIDENT);
|
||||
return MOD_CONT;
|
||||
}
|
||||
}
|
||||
if (strlen(rawhostmask) < HOSTMAX - 1)
|
||||
snprintf(hostmask, HOSTMAX - 1, "%s", rawhostmask);
|
||||
@@ -918,14 +915,14 @@ int do_on(User * u)
|
||||
} else {
|
||||
notice_lang(s_HostServ, u, HOST_ACTIVATED, vHost);
|
||||
}
|
||||
send_on(u->nick, vIdent, vHost);
|
||||
#ifdef HAS_VHOST
|
||||
u->vhost = sstrdup(vHost);
|
||||
#endif
|
||||
#ifdef HAS_VIDENT
|
||||
if (vIdent)
|
||||
u->vident = sstrdup(vIdent);
|
||||
#endif
|
||||
anope_cmd_vhost_on(u->nick, vIdent, vHost);
|
||||
if (ircd->vhost) {
|
||||
u->vhost = sstrdup(vHost);
|
||||
}
|
||||
if (ircd->vident) {
|
||||
if (vIdent)
|
||||
u->vident = sstrdup(vIdent);
|
||||
}
|
||||
set_lastmask(u);
|
||||
}
|
||||
} else {
|
||||
@@ -951,14 +948,14 @@ int do_on_id(User * u)
|
||||
} else {
|
||||
notice_lang(s_HostServ, u, HOST_ACTIVATED, vHost);
|
||||
}
|
||||
send_on(u->nick, vIdent, vHost);
|
||||
#ifdef HAS_VHOST
|
||||
u->vhost = sstrdup(vHost);
|
||||
#endif
|
||||
#ifdef HAS_VIDENT
|
||||
if (vIdent)
|
||||
u->vident = sstrdup(vIdent);
|
||||
#endif
|
||||
anope_cmd_vhost_on(u->nick, vIdent, vHost);
|
||||
if (ircd->vhost) {
|
||||
u->vhost = sstrdup(vHost);
|
||||
}
|
||||
if (ircd->vident) {
|
||||
if (vIdent)
|
||||
u->vident = sstrdup(vIdent);
|
||||
}
|
||||
set_lastmask(u);
|
||||
}
|
||||
return MOD_CONT;
|
||||
@@ -988,7 +985,7 @@ int do_del(User * u)
|
||||
int do_off(User * u)
|
||||
{
|
||||
/* put any generic code here... :) */
|
||||
send_off(u);
|
||||
anope_cmd_vhost_off(u->nick);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -1031,76 +1028,16 @@ void set_lastmask(User * u)
|
||||
free(u->na->last_usermask);
|
||||
|
||||
u->na->last_usermask =
|
||||
smalloc(strlen(GetIdent(u)) + strlen(GetHost(u)) + 2);
|
||||
sprintf(u->na->last_usermask, "%s@%s", GetIdent(u), GetHost(u));
|
||||
smalloc(strlen(common_get_vident(u)) +
|
||||
strlen(common_get_vhost(u)) + 2);
|
||||
sprintf(u->na->last_usermask, "%s@%s", common_get_vident(u),
|
||||
common_get_vhost(u));
|
||||
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/* End of Generic Functions */
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/* Start of Server Functions */
|
||||
/*************************************************************************/
|
||||
void send_on(char *nick, char *vIdent, char *vhost)
|
||||
{
|
||||
#ifdef IRC_UNREAL
|
||||
if (vIdent) {
|
||||
send_cmd(ServerName, "CHGIDENT %s %s", nick, vIdent);
|
||||
}
|
||||
send_cmd(ServerName, "CHGHOST %s %s", nick, vhost);
|
||||
#endif
|
||||
#ifdef IRC_VIAGRA
|
||||
if (vIdent) {
|
||||
send_cmd(NULL, "CHGIDENT %s %s", nick, vIdent);
|
||||
}
|
||||
send_cmd(NULL, "SVSMODE %s +x", nick);
|
||||
send_cmd(NULL, "SVSCHGHOST %s %s", nick, vhost);
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE
|
||||
if (vIdent) {
|
||||
send_cmd(ServerName, "CHGIDENT %s %s", nick, vIdent);
|
||||
}
|
||||
send_cmd(s_HostServ, "SVSMODE %s +x", nick);
|
||||
send_cmd(ServerName, "CHGHOST %s %s", nick, vhost);
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE3
|
||||
send_cmd(s_HostServ, "SVSMODE %s +x", nick);
|
||||
send_cmd(ServerName, "SETHOST %s %s", nick, vhost);
|
||||
#endif
|
||||
#ifdef IRC_RAGE2
|
||||
send_cmd(s_HostServ, "SVSMODE %s +z", nick);
|
||||
send_cmd(ServerName, "VHOST %s %s", nick, vhost);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
void send_off(User * u)
|
||||
{
|
||||
#ifdef IRC_UNREAL
|
||||
send_cmd(s_HostServ, "SVSMODE %s -xt", u->nick);
|
||||
notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick);
|
||||
/*
|
||||
* tell them to type /mode nick +x to get their original
|
||||
* host cloaking back
|
||||
*/
|
||||
#endif
|
||||
#ifdef IRC_VIAGRA
|
||||
send_cmd(NULL, "SVSMODE %s -x", u->nick);
|
||||
notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick);
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE
|
||||
/* UltimateIRCd 2.x does not allow users to control +x */
|
||||
#endif
|
||||
#ifdef IRC_ULTIMATE3
|
||||
send_cmd(s_HostServ, "SVSMODE %s -x", u->nick);
|
||||
notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick);
|
||||
#endif
|
||||
#ifdef IRC_RAGE2
|
||||
send_cmd(s_HostServ, "SVSMODE %s -z", u->nick);
|
||||
notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/* End of Server Functions */
|
||||
|
||||
+1154
File diff suppressed because it is too large
Load Diff
+47
-160
@@ -17,64 +17,9 @@
|
||||
int servernum = 0;
|
||||
|
||||
extern void moduleAddMsgs(void);
|
||||
extern void moduleAddIRCDMsgs(void);
|
||||
/*************************************************************************/
|
||||
|
||||
/* Send a NICK command for the given pseudo-client. If `user' is NULL,
|
||||
* send NICK commands for all the pseudo-clients.
|
||||
*
|
||||
* Now also sends MODE and SQLINE */
|
||||
#if defined(IRC_HYBRID)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
kill_user(NULL, (nick), "Nick used by Services"); \
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", (nick), time(NULL), (modes), \
|
||||
ServiceUser, ServiceHost, ServerName, (name)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_ULTIMATE3)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", (nick), time(NULL), (modes), \
|
||||
ServiceUser, ServiceHost, ServerName, (name)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_RAGE2)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", (nick), time(NULL), ServiceUser, \
|
||||
ServiceHost, ServerName, (modes), (name)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_BAHAMUT)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", (nick), time(NULL), (modes), \
|
||||
ServiceUser, ServiceHost, ServerName, (name)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_UNREAL)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 %s * :%s", (nick), time(NULL), \
|
||||
ServiceUser, ServiceHost, ServerName, (modes), (name)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_DREAMFORGE)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", (nick), time(NULL), \
|
||||
ServiceUser, ServiceHost, ServerName, (name)); \
|
||||
if (strcmp(modes, "+")) send_mode((nick), (nick), "%s", (modes)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#elif defined(IRC_PTLINK)
|
||||
# define NICK(nick,name,modes) \
|
||||
do { \
|
||||
send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", (nick), time(NULL), \
|
||||
(modes), ServiceUser, ServiceHost, ServiceHost, ServerName, (name)); \
|
||||
send_cmd(NULL, "SQLINE %s :Reserved for services", (nick)); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
void introduce_user(const char *user)
|
||||
{
|
||||
|
||||
@@ -87,98 +32,107 @@ void introduce_user(const char *user)
|
||||
lasttimes[LTSIZE - 1] = time(NULL);
|
||||
#undef LTSIZE
|
||||
|
||||
/* NickServ */
|
||||
if (!user || stricmp(user, s_NickServ) == 0) {
|
||||
EnforceQlinedNick(s_NickServ, NULL);
|
||||
NICK(s_NickServ, desc_NickServ, NICKSERV_MODE);
|
||||
anope_cmd_nick(s_NickServ, desc_NickServ, ircd->nickservmode);
|
||||
}
|
||||
|
||||
/* ChanServ */
|
||||
if (!user || stricmp(user, s_ChanServ) == 0) {
|
||||
EnforceQlinedNick(s_ChanServ, NULL);
|
||||
NICK(s_ChanServ, desc_ChanServ, CHANSERV_MODE);
|
||||
anope_cmd_nick(s_ChanServ, desc_ChanServ, ircd->chanservmode);
|
||||
}
|
||||
#ifdef HAS_VHOST
|
||||
if (s_HostServ && (!user || stricmp(user, s_HostServ) == 0)) {
|
||||
if (s_HostServ && ircd->vhost
|
||||
&& (!user || stricmp(user, s_HostServ) == 0)) {
|
||||
EnforceQlinedNick(s_HostServ, NULL);
|
||||
NICK(s_HostServ, desc_HostServ, HOSTSERV_MODE);
|
||||
anope_cmd_nick(s_HostServ, desc_HostServ, ircd->hostservmode);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!user || stricmp(user, s_MemoServ) == 0) {
|
||||
EnforceQlinedNick(s_MemoServ, NULL);
|
||||
NICK(s_MemoServ, desc_MemoServ, MEMOSERV_MODE);
|
||||
anope_cmd_nick(s_MemoServ, desc_MemoServ, ircd->memoservmode);
|
||||
}
|
||||
|
||||
if (s_BotServ && (!user || stricmp(user, s_BotServ) == 0)) {
|
||||
EnforceQlinedNick(s_BotServ, NULL);
|
||||
NICK(s_BotServ, desc_BotServ, BOTSERV_MODE);
|
||||
anope_cmd_nick(s_BotServ, desc_BotServ, ircd->botservmode);
|
||||
}
|
||||
|
||||
if (!user || stricmp(user, s_HelpServ) == 0) {
|
||||
EnforceQlinedNick(s_HelpServ, NULL);
|
||||
NICK(s_HelpServ, desc_HelpServ, HELPSERV_MODE);
|
||||
anope_cmd_nick(s_HelpServ, desc_HelpServ, ircd->helpservmode);
|
||||
}
|
||||
|
||||
if (!user || stricmp(user, s_OperServ) == 0) {
|
||||
EnforceQlinedNick(s_OperServ, NULL);
|
||||
NICK(s_OperServ, desc_OperServ, OPERSERV_MODE);
|
||||
anope_cmd_nick(s_OperServ, desc_OperServ, ircd->operservmode);
|
||||
}
|
||||
|
||||
if (s_DevNull && (!user || stricmp(user, s_DevNull) == 0)) {
|
||||
EnforceQlinedNick(s_DevNull, NULL);
|
||||
NICK(s_DevNull, desc_DevNull, DEVNULL_MODE);
|
||||
anope_cmd_nick(s_DevNull, desc_DevNull, ircd->devnullmode);
|
||||
}
|
||||
|
||||
if (!user || stricmp(user, s_GlobalNoticer) == 0) {
|
||||
EnforceQlinedNick(s_GlobalNoticer, NULL);
|
||||
NICK(s_GlobalNoticer, desc_GlobalNoticer, GLOBAL_MODE);
|
||||
anope_cmd_nick(s_GlobalNoticer, desc_GlobalNoticer,
|
||||
ircd->globalmode);
|
||||
}
|
||||
|
||||
/* We make aliases go online */
|
||||
if (s_NickServAlias && (!user || stricmp(user, s_NickServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_NickServAlias, NULL);
|
||||
NICK(s_NickServAlias, desc_NickServAlias, NICKSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_NickServAlias, desc_NickServAlias,
|
||||
ircd->nickservaliasmode);
|
||||
}
|
||||
|
||||
if (s_ChanServAlias && (!user || stricmp(user, s_ChanServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_ChanServAlias, NULL);
|
||||
NICK(s_ChanServAlias, desc_ChanServAlias, CHANSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_ChanServAlias, desc_ChanServAlias,
|
||||
ircd->chanservaliasmode);
|
||||
}
|
||||
|
||||
if (s_MemoServAlias && (!user || stricmp(user, s_MemoServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_MemoServAlias, NULL);
|
||||
NICK(s_MemoServAlias, desc_MemoServAlias, MEMOSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_MemoServAlias, desc_MemoServAlias,
|
||||
ircd->memoservaliasmode);
|
||||
}
|
||||
|
||||
if (s_BotServAlias && (!user || stricmp(user, s_BotServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_BotServAlias, NULL);
|
||||
NICK(s_BotServAlias, desc_BotServAlias, BOTSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_BotServAlias, desc_BotServAlias,
|
||||
ircd->botservaliasmode);
|
||||
}
|
||||
|
||||
if (s_HelpServAlias && (!user || stricmp(user, s_HelpServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_HelpServAlias, NULL);
|
||||
NICK(s_HelpServAlias, desc_HelpServAlias, HELPSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_HelpServAlias, desc_HelpServAlias,
|
||||
ircd->helpservaliasmode);
|
||||
}
|
||||
|
||||
if (s_OperServAlias && (!user || stricmp(user, s_OperServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_OperServAlias, NULL);
|
||||
NICK(s_OperServAlias, desc_OperServAlias, OPERSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_OperServAlias, desc_OperServAlias,
|
||||
ircd->operservaliasmode);
|
||||
}
|
||||
|
||||
if (s_DevNullAlias && (!user || stricmp(user, s_DevNullAlias) == 0)) {
|
||||
EnforceQlinedNick(s_DevNullAlias, NULL);
|
||||
NICK(s_DevNullAlias, desc_DevNullAlias, DEVNULL_ALIAS_MODE);
|
||||
anope_cmd_nick(s_DevNullAlias, desc_DevNullAlias,
|
||||
ircd->devnullvaliasmode);
|
||||
}
|
||||
#ifdef HAS_VHOST
|
||||
if (s_HostServAlias && (!user || stricmp(user, s_HostServAlias) == 0)) {
|
||||
if (s_HostServAlias && ircd->vhost
|
||||
&& (!user || stricmp(user, s_HostServAlias) == 0)) {
|
||||
EnforceQlinedNick(s_HostServAlias, NULL);
|
||||
NICK(s_HostServAlias, desc_HostServAlias, HOSTSERV_ALIAS_MODE);
|
||||
anope_cmd_nick(s_HostServAlias, desc_HostServAlias,
|
||||
ircd->hostservaliasmode);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s_GlobalNoticerAlias
|
||||
&& (!user || stricmp(user, s_GlobalNoticerAlias) == 0)) {
|
||||
EnforceQlinedNick(s_GlobalNoticerAlias, NULL);
|
||||
NICK(s_GlobalNoticerAlias, desc_GlobalNoticerAlias,
|
||||
GLOBAL_ALIAS_MODE);
|
||||
anope_cmd_nick(s_GlobalNoticerAlias, desc_GlobalNoticerAlias,
|
||||
ircd->globalaliasmode);
|
||||
}
|
||||
|
||||
/* We make the bots go online */
|
||||
@@ -192,8 +146,8 @@ void introduce_user(const char *user)
|
||||
EnforceQlinedNick(bi->nick, s_BotServ);
|
||||
|
||||
if (!user || !stricmp(user, bi->nick))
|
||||
NEWNICK(bi->nick, bi->user, bi->host, bi->real,
|
||||
BOTSERV_BOTS_MODE, 1);
|
||||
anope_cmd_bot_nick(bi->nick, bi->user, bi->host,
|
||||
bi->real, ircd->botserv_bot_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -513,6 +467,9 @@ int init(int ac, char **av)
|
||||
if (!read_config(0))
|
||||
return -1;
|
||||
|
||||
/* Add IRCD Message handlers */
|
||||
moduleAddIRCDMsgs();
|
||||
|
||||
/* Add Core MSG handles */
|
||||
moduleAddMsgs();
|
||||
|
||||
@@ -735,75 +692,8 @@ int init(int ac, char **av)
|
||||
RemotePort);
|
||||
}
|
||||
|
||||
#ifdef IRC_UNREAL
|
||||
send_cmd(NULL, "PROTOCTL NICKv2 VHP");
|
||||
#endif
|
||||
#if defined(IRC_ULTIMATE3)
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword);
|
||||
else if (servernum == 2)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword2);
|
||||
else if (servernum == 3)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword3);
|
||||
send_cmd(NULL, "CAPAB NICKIP SSJ5 TS5 CLIENT");
|
||||
#elif defined(IRC_RAGE2)
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword);
|
||||
else if (servernum == 2)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword2);
|
||||
else if (servernum == 3)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword3);
|
||||
send_cmd(NULL, "CAPAB SSJ3 SN2 VHOST");
|
||||
#elif defined(IRC_BAHAMUT)
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword);
|
||||
else if (servernum == 2)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword2);
|
||||
else if (servernum == 3)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword3);
|
||||
send_cmd(NULL, "CAPAB NICKIP SSJOIN TS3 NOQUIT TSMODE UNCONNECT");
|
||||
#elif defined(IRC_HYBRID)
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword);
|
||||
else if (servernum == 2)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword2);
|
||||
else if (servernum == 3)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword3);
|
||||
send_cmd(NULL, "CAPAB TS5 EX IE HOPS HUB AOPS");
|
||||
#elif defined(IRC_PTLINK)
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword);
|
||||
else if (servernum == 2)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword2);
|
||||
else if (servernum == 3)
|
||||
send_cmd(NULL, "PASS %s :TS", RemotePassword3);
|
||||
#else
|
||||
if (servernum == 1)
|
||||
send_cmd(NULL, "PASS :%s", RemotePassword);
|
||||
if (servernum == 2)
|
||||
send_cmd(NULL, "PASS :%s", RemotePassword2);
|
||||
if (servernum == 3)
|
||||
send_cmd(NULL, "PASS :%s", RemotePassword3);
|
||||
#endif
|
||||
#ifdef IRC_PTLINK
|
||||
send_cmd(NULL, "SERVER %s 1 Anope.Services%s :%s",
|
||||
ServerName, version_number, ServerDesc);
|
||||
#else
|
||||
send_cmd(NULL, "SERVER %s 1 :%s", ServerName, ServerDesc);
|
||||
#endif
|
||||
#ifdef IRC_RAGE2
|
||||
send_cmd(NULL, "SVINFO 5 5 0 %ld bluemoon 0", time(NULL));
|
||||
#endif
|
||||
#if defined(IRC_BAHAMUT) && !defined(IRC_RAGE2)
|
||||
send_cmd(NULL, "SVINFO 3 1 0 :%ld", time(NULL));
|
||||
#endif
|
||||
#ifdef IRC_HYBRID
|
||||
send_cmd(NULL, "SVSINFO 5 5 0 :%ld", time(NULL));
|
||||
#endif
|
||||
#ifdef IRC_PTLINK
|
||||
send_cmd(NULL, "SVINFO 3 6 %lu", time(NULL));
|
||||
send_cmd(NULL, "SVSINFO %lu %d", time(NULL), maxusercnt);
|
||||
#endif
|
||||
anope_cmd_connect(servernum);
|
||||
|
||||
sgets2(inbuf, sizeof(inbuf), servsock);
|
||||
if (strnicmp(inbuf, "ERROR", 5) == 0) {
|
||||
/* Close server socket first to stop wallops, since the other
|
||||
@@ -815,20 +705,17 @@ int init(int ac, char **av)
|
||||
|
||||
/* Announce a logfile error if there was one */
|
||||
if (openlog_failed) {
|
||||
wallops(NULL, "Warning: couldn't open logfile: %s",
|
||||
strerror(openlog_errno));
|
||||
anope_cmd_global(NULL, "Warning: couldn't open logfile: %s",
|
||||
strerror(openlog_errno));
|
||||
}
|
||||
|
||||
/* Bring in our pseudo-clients */
|
||||
introduce_user(NULL);
|
||||
|
||||
/* And hybrid needs Global joined in the logchan */
|
||||
#ifdef IRC_HYBRID
|
||||
if (logchan) {
|
||||
send_cmd(NULL, "SJOIN %ld %s + :%s", time(NULL), LogChannel,
|
||||
s_GlobalNoticer);
|
||||
if (logchan && ircd->join2msg) {
|
||||
anope_cmd_join(s_GlobalNoticer, LogChannel, time(NULL));
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Load our delayed modeles - modules that are planing on making clients need to wait till now
|
||||
|
||||
+1
-2
@@ -258,8 +258,7 @@ int strftime_lang(char *buf, int size, User * u, int format, struct tm *tm)
|
||||
|
||||
/* Send a syntax-error message to the user. */
|
||||
|
||||
void syntax_error(const char *service, User * u, const char *command,
|
||||
int msgnum)
|
||||
void syntax_error(char *service, User * u, char *command, int msgnum)
|
||||
{
|
||||
const char *str = getstring(u->na, msgnum);
|
||||
notice_lang(service, u, SYNTAX_ERROR, str);
|
||||
|
||||
@@ -248,7 +248,7 @@ void fatal(const char *fmt, ...)
|
||||
if (nofork)
|
||||
fprintf(stderr, "%sFATAL: %s\n", buf, buf2);
|
||||
if (servsock >= 0)
|
||||
wallops(NULL, "FATAL ERROR! %s", buf2);
|
||||
anope_cmd_global(NULL, "FATAL ERROR! %s", buf2);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,8 @@ void fatal_perror(const char *fmt, ...)
|
||||
fprintf(stderr, "%sFATAL: %s: %s\n", buf, buf2,
|
||||
strerror(errno_save));
|
||||
if (servsock >= 0)
|
||||
wallops(NULL, "FATAL ERROR! %s: %s", buf2, strerror(errno_save));
|
||||
anope_cmd_global(NULL, "FATAL ERROR! %s: %s", buf2,
|
||||
strerror(errno_save));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
+21
-20
@@ -102,16 +102,18 @@ static void expire_all(void)
|
||||
}
|
||||
waiting = -25;
|
||||
expire_akills();
|
||||
#ifdef IRC_BAHAMUT
|
||||
waiting = -26;
|
||||
expire_sglines();
|
||||
#endif
|
||||
waiting = -28;
|
||||
expire_sqlines();
|
||||
#ifdef IRC_BAHAMUT
|
||||
waiting = -27;
|
||||
expire_szlines();
|
||||
#endif
|
||||
if (ircd->sgline) {
|
||||
waiting = -26;
|
||||
expire_sglines();
|
||||
}
|
||||
if (ircd->sqline) {
|
||||
waiting = -28;
|
||||
expire_sqlines();
|
||||
}
|
||||
if (ircd->szline) {
|
||||
waiting = -27;
|
||||
expire_szlines();
|
||||
}
|
||||
#ifndef STREAMLINED
|
||||
expire_exceptions();
|
||||
#endif
|
||||
@@ -170,7 +172,7 @@ void save_databases(void)
|
||||
waiting = -13;
|
||||
}
|
||||
/* Temporary fix to avoid unwanted timeouts... */
|
||||
send_cmd(ServerName, "PONG %s", ServerName);
|
||||
anope_cmd_pong(ServerName, ServerName);
|
||||
if (s_BotServ) {
|
||||
waiting = -14;
|
||||
save_bs_rdb_dbase();
|
||||
@@ -199,7 +201,7 @@ static void services_restart(void)
|
||||
alog("Restarting");
|
||||
if (!quitmsg)
|
||||
quitmsg = "Restarting";
|
||||
send_cmd(ServerName, "SQUIT %s :%s", ServerName, quitmsg);
|
||||
anope_cmd_squit(ServerName, quitmsg);
|
||||
disconn(servsock);
|
||||
close_log();
|
||||
#if defined(LINUX20) || defined(LINUX22)
|
||||
@@ -236,7 +238,7 @@ static void services_shutdown(void)
|
||||
quitmsg = "Terminating, reason unknown";
|
||||
alog("%s", quitmsg);
|
||||
if (started)
|
||||
send_cmd(ServerName, "SQUIT %s :%s", ServerName, quitmsg);
|
||||
anope_cmd_squit(ServerName, quitmsg);
|
||||
disconn(servsock);
|
||||
}
|
||||
|
||||
@@ -301,7 +303,7 @@ void sighandler(int signum)
|
||||
inbuf[447] = '>';
|
||||
inbuf[448] = 0;
|
||||
}
|
||||
wallops(NULL, "PANIC! buffer = %s\r\n", inbuf);
|
||||
anope_cmd_global(NULL, "PANIC! buffer = %s\r\n", inbuf);
|
||||
} else if (waiting < 0) {
|
||||
/* This is static on the off-chance we run low on stack */
|
||||
static char buf[BUFSIZE];
|
||||
@@ -345,21 +347,20 @@ void sighandler(int signum)
|
||||
case -25:
|
||||
snprintf(buf, sizeof(buf), "expiring autokills");
|
||||
break;
|
||||
#ifdef IRC_BAHAMUT
|
||||
case -26:
|
||||
snprintf(buf, sizeof(buf), "expiring SGLINEs");
|
||||
break;
|
||||
case -27:
|
||||
snprintf(buf, sizeof(buf), "expiring SZLINEs");
|
||||
break;
|
||||
#endif
|
||||
case -28:
|
||||
snprintf(buf, sizeof(buf), "expiring SQLINEs");
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "waiting=%d", waiting);
|
||||
}
|
||||
wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum));
|
||||
anope_cmd_global(NULL, "PANIC! %s (%s)", buf,
|
||||
strsignal(signum));
|
||||
alog("PANIC! %s (%s)", buf, strsignal(signum));
|
||||
}
|
||||
}
|
||||
@@ -456,8 +457,8 @@ int main(int ac, char **av, char **envp)
|
||||
|
||||
if (!readonly && (save_data || t - last_update >= UpdateTimeout)) {
|
||||
if (delayed_quit)
|
||||
wallops(NULL,
|
||||
"Updating databases on shutdown, please wait.");
|
||||
anope_cmd_global(NULL,
|
||||
"Updating databases on shutdown, please wait.");
|
||||
|
||||
save_databases();
|
||||
|
||||
@@ -510,7 +511,7 @@ int main(int ac, char **av, char **envp)
|
||||
alog("Restarting");
|
||||
if (!quitmsg)
|
||||
quitmsg = "Restarting";
|
||||
send_cmd(ServerName, "SQUIT %s :%s", ServerName, quitmsg);
|
||||
anope_cmd_squit(ServerName, quitmsg);
|
||||
disconn(servsock);
|
||||
close_log();
|
||||
#if defined(LINUX20) || defined(LINUX22)
|
||||
|
||||
+156
-1049
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
/* Miscellaneous routines.
|
||||
/* Miscellaneous routines.
|
||||
*
|
||||
* (C) 2003 Anope Team
|
||||
@@ -709,3 +710,4 @@ int nickIsServices(char *nick)
|
||||
|
||||
return found;
|
||||
}
|
||||
| ||||