add set options for nick, user, host and realname to core modules

This commit is contained in:
Mark 2004-02-17 23:12:28 +00:00
parent 46d4ecc214
commit edcff3f9ed
12 changed files with 126 additions and 15 deletions

View file

@ -1,6 +1,9 @@
ConnectServ Module for NeoStats 2.x ChangeLog
Shmad & ^Enigma^
==============================================================================
* Version 1.14 * Mark (M) * Feb 17, 2004
- SET interface for nick/user/host/realname added (M)
* Version 1.13 * Mark (M) * January 9, 2004
- New SERVWATCH option to track server joins/quits (M)
- Tidy up message strings (M)

View file

@ -120,6 +120,10 @@ static bot_cmd cs_commands[]=
static bot_setting cs_settings[]=
{
{"NICK", &s_ConnectServ, SET_TYPE_STRING, 0, MAXNICK, NS_ULEVEL_ADMIN, "Nick", NULL, ns_help_set_nick },
{"USER", &cs_cfg.user, SET_TYPE_STRING, 0, MAXUSER, NS_ULEVEL_ADMIN, "User", NULL, ns_help_set_user },
{"HOST", &cs_cfg.host, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "Host", NULL, ns_help_set_host },
{"REALNAME", &cs_cfg.rname, SET_TYPE_STRING, 0, MAXREALNAME, NS_ULEVEL_ADMIN, "RealName",NULL, ns_help_set_realname },
{"SIGNWATCH", &cs_cfg.sign_watch, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "SignWatch", NULL, cs_help_set_signwatch },
{"KILLWATCH", &cs_cfg.kill_watch, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "KillWatch", NULL, cs_help_set_killwatch },
{"MODEWATCH", &cs_cfg.mode_watch, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "ModeWatch", NULL, cs_help_set_modewatch },

View file

@ -2,7 +2,10 @@ HostServ Module for NeoStats 2.x ChangeLog
Shmad <shmad@neostats.net>
^Enigma^ <enigma@neostats.net>
==============================================================================
* Version 3.3 * Fish (F) * Jan 27, 2003
* Version 3.4 * Mark (M) * Feb 17, 2004
- SET interface for nick/user/host/realname added (M)
* Version 3.3 * Fish (F) * Jan 27, 2004
- HostServ uses Global Exclusions in Unet style vhosts, and also on signon
* Version 3.2 * Mark (M) * November 27, 2003

View file

@ -138,6 +138,10 @@ static bot_cmd hs_commands[]=
static bot_setting hs_settings[]=
{
{"NICK", &s_HostServ, SET_TYPE_STRING, 0, MAXNICK, NS_ULEVEL_ADMIN, "Nick", NULL, ns_help_set_nick },
{"USER", &hs_cfg.user, SET_TYPE_STRING, 0, MAXUSER, NS_ULEVEL_ADMIN, "User", NULL, ns_help_set_user },
{"HOST", &hs_cfg.host, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "Host", NULL, ns_help_set_host },
{"REALNAME", &hs_cfg.rname, SET_TYPE_STRING, 0, MAXREALNAME, NS_ULEVEL_ADMIN, "RealName",NULL, ns_help_set_realname },
{"EXPIRE", &hs_cfg.old, SET_TYPE_INT, 0, 99, NS_ULEVEL_ADMIN, "ExpireDays", "days", hs_help_set_expire },
{"HIDDENHOST", &hs_cfg.regnick, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "UnetVhosts", NULL, hs_help_set_hiddenhost },
{"HOSTNAME", &hs_cfg.vhostdom, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "UnetDomain", NULL, hs_help_set_hostname },

View file

@ -1,12 +1,15 @@
Program: LoveServ Module for NeoStats 2.x ChangeLog
Author: Shmad <shmad@neostats.net>
==============================================================================
* Version 1.91 *
- We now try to read nick, user, host and realname so these can be configured more
easily (M)
- SET interface for nick/user/host/realname added (M)
* Version 1.9 *
- Use core bot message handler to process commands (M)
- Code cleaned up to reduce bloat (M)
- Removed local module_function table to use core for /VERSION replies (M)
- We now try to read nick, user, host and realname so these can be configured more
easily (M)
* Version 1.8 * October 6th, 2003
- Help text cleanup (M)

View file

@ -73,10 +73,18 @@ static bot_cmd ls_commands[]=
{NULL, NULL, 0, 0, NULL, NULL}
};
static bot_setting ls_settings[]=
{
{"NICK", &s_LoveServ, SET_TYPE_STRING, 0, MAXNICK, NS_ULEVEL_ADMIN, "Nick", NULL, ns_help_set_nick },
{"USER", &ls_cfg.user, SET_TYPE_STRING, 0, MAXUSER, NS_ULEVEL_ADMIN, "User", NULL, ns_help_set_user },
{"HOST", &ls_cfg.host, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "Host", NULL, ns_help_set_host },
{"REALNAME", &ls_cfg.rname, SET_TYPE_STRING, 0, MAXREALNAME, NS_ULEVEL_ADMIN, "RealName",NULL, ns_help_set_realname },
};
static int Online(char **av, int ac)
{
ls_bot = init_mod_bot(s_LoveServ, ls_cfg.user, ls_cfg.host, ls_cfg.rname,
services_bot_modes, BOT_FLAG_DEAF, ls_commands, NULL, __module_info.module_name);
services_bot_modes, BOT_FLAG_DEAF, ls_commands, ls_settings, __module_info.module_name);
return 1;
};

View file

@ -1,5 +1,10 @@
MoraleServ ChangeLog - Anything we add/remove/fix/change is in here (even our rants)
==============================================================================
* MoraleServ * Mark (M) * Version 2.23
- We now try to read nick, user, host and realname so these can be configured more
easily (M)
- SET interface for nick/user/host/realname added (M)
* MoraleServ * Mark (M) * Version 2.22
- Use core bot message handler to process commands (M)
- Fixed chanalert messages to report bot as sender, not neostats (M)

View file

@ -29,6 +29,12 @@
static char s_MoraleServ[MAXNICK];
static ModUser *ms_bot;
struct ms_cfg {
char user[MAXUSER];
char host[MAXHOST];
char rname[MAXREALNAME];
} ms_cfg;
static int ms_hail(User * u, char **av, int ac);
static int ms_ode(User * u, char **av, int ac);
static int ms_lapdance(User * u, char **av, int ac);
@ -63,9 +69,17 @@ static bot_cmd ms_commands[]=
{NULL, NULL, 0, 0, NULL, NULL}
};
static bot_setting ms_settings[]=
{
{"NICK", &s_MoraleServ, SET_TYPE_STRING, 0, MAXNICK, NS_ULEVEL_ADMIN, "Nick", NULL, ns_help_set_nick },
{"USER", &ms_cfg.user, SET_TYPE_STRING, 0, MAXUSER, NS_ULEVEL_ADMIN, "User", NULL, ns_help_set_user },
{"HOST", &ms_cfg.host, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "Host", NULL, ns_help_set_host },
{"REALNAME", &ms_cfg.rname, SET_TYPE_STRING, 0, MAXREALNAME, NS_ULEVEL_ADMIN, "RealName",NULL, ns_help_set_realname },
};
static int Online(char **av, int ac)
{
ms_bot = init_mod_bot(s_MoraleServ, "MS", me.name, "A Network Morale Service",
ms_bot = init_mod_bot(s_MoraleServ, ms_cfg.user, ms_cfg.host, ms_cfg.rname,
services_bot_modes, BOT_FLAG_DEAF, ms_commands, NULL, __module_info.module_name);
return 1;
};
@ -77,7 +91,36 @@ EventFnList __module_events[] = {
int __ModInit(int modnum, int apiver)
{
strlcpy(s_MoraleServ, "MoraleServ", MAXNICK);
char *temp = NULL;
if(GetConf((void *) &temp, CFGSTR, "Nick") < 0) {
strlcpy(s_MoraleServ ,"MoraleServ" ,MAXNICK);
}
else {
strlcpy(s_MoraleServ , temp, MAXNICK);
free(temp);
}
if(GetConf((void *) &temp, CFGSTR, "User") < 0) {
strlcpy(ms_cfg.user, "SS", MAXUSER);
}
else {
strlcpy(ms_cfg.user, temp, MAXUSER);
free(temp);
}
if(GetConf((void *) &temp, CFGSTR, "Host") < 0) {
strlcpy(ms_cfg.host, me.name, MAXHOST);
}
else {
strlcpy(ms_cfg.host, temp, MAXHOST);
free(temp);
}
if(GetConf((void *) &temp, CFGSTR, "RealName") < 0) {
strlcpy(ms_cfg.rname, "A Network Morale Service", MAXREALNAME);
}
else {
strlcpy(ms_cfg.rname, temp, MAXREALNAME);
free(temp);
}
return 1;
}

View file

@ -4,6 +4,9 @@ Shmad & ^Enigma & Fish^
(S) denotes Shmad (E) denotes ^Enigma^
(F) denotes Fish (M) denotes Mark
* Revision 1199 * Feb 17, 2004 (M)
- SET interface for nick/user/host/realname added (M)
* Revision 1199 * January 9, 2004 (M)
- removed fopen attempt on old system of dl/statserv/html/index.tpl. (M)
- improved error message for failed open of template and output file (M)

View file

@ -283,15 +283,19 @@ bot_cmd ss_commands[]=
bot_setting ss_settings[]=
{
{"HTML", &StatServ.html, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "HTML_Enabled", NULL, ss_help_set_html},
{"HTMLPATH", &StatServ.htmlpath, SET_TYPE_STRING, 0, MAXPATH, NS_ULEVEL_ADMIN, "HTML_Path", NULL, ss_help_set_htmlpath },
{"MSGINTERVAL", &StatServ.msginterval, SET_TYPE_INT, 1, 99, NS_ULEVEL_ADMIN, "MsgInterval", "seconds", ss_help_set_msginterval },
{"MSGLIMIT", &StatServ.msglimit, SET_TYPE_INT, 1, 99, NS_ULEVEL_ADMIN, "MsgLimit", NULL, ss_help_set_msglimit },
{"LAGTIME", &StatServ.lagtime, SET_TYPE_INT, 1, 256, NS_ULEVEL_ADMIN, "LagTime", "seconds", ss_help_set_lagtime },
{"LAGALERT", &StatServ.lagalert, SET_TYPE_INT, 0, 3, NS_ULEVEL_ADMIN, "LagAlert", NULL, ss_help_set_lagalert },
{"RECORDALERT", &StatServ.recordalert, SET_TYPE_INT, 0, 3, NS_ULEVEL_ADMIN, "RecordAlert", NULL, ss_help_set_recordalert },
{"USEEXCLUSIONS", &StatServ.exclusions, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "Exclusions", NULL, ss_help_set_exclusions },
{NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL },
{"NICK", &s_StatServ, SET_TYPE_STRING, 0, MAXNICK, NS_ULEVEL_ADMIN, "Nick", NULL, ns_help_set_nick },
{"USER", &StatServ.user, SET_TYPE_STRING, 0, MAXUSER, NS_ULEVEL_ADMIN, "User", NULL, ns_help_set_user },
{"HOST", &StatServ.host, SET_TYPE_STRING, 0, MAXHOST, NS_ULEVEL_ADMIN, "Host", NULL, ns_help_set_host },
{"REALNAME", &StatServ.rname, SET_TYPE_STRING, 0, MAXREALNAME, NS_ULEVEL_ADMIN, "RealName",NULL, ns_help_set_realname },
{"HTML", &StatServ.html, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "HTML_Enabled", NULL, ss_help_set_html},
{"HTMLPATH", &StatServ.htmlpath, SET_TYPE_STRING, 0, MAXPATH, NS_ULEVEL_ADMIN, "HTML_Path", NULL, ss_help_set_htmlpath },
{"MSGINTERVAL", &StatServ.msginterval, SET_TYPE_INT, 1, 99, NS_ULEVEL_ADMIN, "MsgInterval", "seconds", ss_help_set_msginterval },
{"MSGLIMIT", &StatServ.msglimit, SET_TYPE_INT, 1, 99, NS_ULEVEL_ADMIN, "MsgLimit", NULL, ss_help_set_msglimit },
{"LAGTIME", &StatServ.lagtime, SET_TYPE_INT, 1, 256, NS_ULEVEL_ADMIN, "LagTime", "seconds", ss_help_set_lagtime },
{"LAGALERT", &StatServ.lagalert, SET_TYPE_INT, 0, 3, NS_ULEVEL_ADMIN, "LagAlert", NULL, ss_help_set_lagalert },
{"RECORDALERT", &StatServ.recordalert, SET_TYPE_INT, 0, 3, NS_ULEVEL_ADMIN, "RecordAlert", NULL, ss_help_set_recordalert },
{"USEEXCLUSIONS", &StatServ.exclusions, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, "Exclusions", NULL, ss_help_set_exclusions },
{NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL },
};
int topchan(const void *key1, const void *key2)

View file

@ -251,3 +251,28 @@ const char *ns_help_status[] = {
"Display info about NeoStats uptime and other stats.",
NULL
};
const char *ns_help_set_nick[] = {
"NICK <newnick> Change bot nickname",
"(requires restart to take effect).",
NULL
};
const char *ns_help_set_user[] = {
"USER <username> Change bot username",
"(requires restart to take effect).",
NULL
};
const char *ns_help_set_host[] = {
"HOST <host> Change bot host",
"(requires restart to take effect).",
NULL
};
const char *ns_help_set_realname[] = {
"REALNAME <realname> Change bot realname",
"(requires restart to take effect).",
NULL
};

View file

@ -652,5 +652,11 @@ int new_transfer(char *url, char *params, NS_TRANSFER savetofileormemory, char *
/* Is the user or server a NeoStats one? */
#define IsMe(x) ((x) && (x->flags & NS_FLAGS_ME))
/* Some standard text help messages */
extern const char *ns_help_set_nick[];
extern const char *ns_help_set_user[];
extern const char *ns_help_set_host[];
extern const char *ns_help_set_realname[];
#endif