- Fixed belarussian-w1251 charset.. accidently copied a "'" which caused an internal

error, reported by Bock ().
- Added information about extbans to help.conf (/HELPOP ?EXTBANS). Patch from Bock
  ().
- Made SAPART work for mulitple channels, just like SAJOIN. Patch provided by Bock
  (). This also fixes SAPART now being announced to all opers globally, just
  like SAJOIN.
- Finally fixed /RESTART issue on windows for good, should now always restart correctly.
  Patch provided by BuHHunyx and Bock ().
This commit is contained in:
Bram Matthys 2006-11-24 19:34:05 +00:00
parent 697eb2c3e4
commit 803a67d4c7
4 changed files with 84 additions and 13 deletions

View file

@ -1382,4 +1382,11 @@
- Rejecting fake +z modes in conf, reported by rve (#0002532).
- Changed some minor Makefile stuff
- Fixed belarussian-w1251 charset.. accidently copied a "'" which caused an internal
error.
error, reported by Bock (#0003114).
- Added information about extbans to help.conf (/HELPOP ?EXTBANS). Patch from Bock
(#0003113).
- Made SAPART work for mulitple channels, just like SAJOIN. Patch provided by Bock
(#0003064). This also fixes SAPART now being announced to all opers globally, just
like SAJOIN.
- Finally fixed /RESTART issue on windows for good, should now always restart correctly.
Patch provided by BuHHunyx and Bock (#0002734).

View file

@ -159,7 +159,8 @@ help Chmodes {
" a <nickname> = Gives Channel Admin to the user";
" q <nickname> = Gives Owner status to the user";
" -";
" b <nick!ident@host> = Bans the nick!ident@host from the channel [h]";
" b <nick!ident@host> = Bans the nick!ident@host from the channel";
" Extended bantypes (for more info see /HELPOP EXTBANS) [h]";
" c = Block messages containing mIRC color codes [o]";
" e <nick!ident@host> = Overrides a ban for matching users [h]";
" I <nick!ident@host> = Overrides +i for matching users [h]";
@ -194,6 +195,35 @@ help Chmodes {
" ==------------------------------oOo----------------------------==";
};
help ExtBans {
" Extended bantypes: ";
" -";
" ==-Type--------Name---------------------------Explanation-----------------------==";
" | | People matching these bans can join but are unable to ";
" ~q | Quiet | speak, unless they have +v or higher. ";
" | | Example: ";
" | | +bb ~q:*!*@blah.blah.com ~q:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | People matching these bans cannot change nicks, unless ";
" ~n | nickchange | they have +v or higher. ";
" | | Example: ";
" | | +bb ~n:*!*@*.aol.com ~n:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | If the user is in this channel then (s)he is unable to ";
" | [prefix] | join. A prefix can also be specified (+/%/@/&/~) which ";
" ~ñ | channel | means that it will only match if the user has that ";
" | | rights or higher on the specified channel. ";
" | | Example: +b ~c:#lamers, +e ~c:@#trusted ";
"-----------------------------------------------------------------------------------";
" | | If the realname of a user matches this then (s)he is ";
" | | unable to join. ";
" ~r | realname | Example: +b ~r:*Stupid_bot_script* ";
" | | NOTE: an underscore ('_') matches both a space (' ') and";
" | | an underscore ('_'), so this ban would ";
" | | match 'Stupid bot script v1.4'. ";
" ==------------------------------------------------------------------------------==";
};
help Chmodef {
" The +f channel mode provides comprehensive flood protection for a channel.";
" This mode allows you to prevent join, nick change, CTCP, text, and knock";

View file

@ -166,7 +166,11 @@ extern void init_glines(void);
extern void tkl_init(void);
MODVAR TS last_garbage_collect = 0;
#ifndef _WIN32
MODVAR char **myargv;
#else
LPCSTR cmdLine;
#endif
int portnum = -1; /* Server port number, listening this */
char *configfile = CONFIGFILE; /* Server configuration file */
int debuglevel = 10; /* Server debug level */
@ -357,7 +361,7 @@ void server_reboot(char *mesg)
if (!IsService)
{
CleanUp();
(void)execv(myargv[0], myargv);
WinExec(cmdLine, SW_SHOWDEFAULT);
}
#endif
#ifndef _WIN32
@ -998,7 +1002,11 @@ int InitwIRCD(int argc, char *argv[])
exit(5);
}
#endif /*CHROOTDIR*/
#ifndef _WIN32
myargv = argv;
#else
cmdLine = GetCommandLine();
#endif
#ifndef _WIN32
(void)umask(077); /* better safe than sorry --SRB */
#else

View file

@ -89,13 +89,18 @@ DLLFUNC int MOD_UNLOAD(m_sapart)(int module_unload)
parv[2] - channel(s) to part
parv[3] - comment
*/
DLLFUNC CMD_FUNC(m_sapart)
{
aClient *acptr;
aChannel *chptr;
Membership *lp;
char *name, *p = NULL;
int i;
char *comment = (parc > 3 && parv[3] ? parv[3] : NULL);
char commentx[512];
char jbuf[BUFSIZE];
if (!IsSAdmin(sptr) && !IsULine(sptr))
{
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
@ -113,23 +118,42 @@ DLLFUNC CMD_FUNC(m_sapart)
sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name, parv[0], parv[1]);
return 0;
}
if (!(chptr = get_channel(acptr, parv[2], 0)))
/* Now works like m_join */
*jbuf = 0;
for (i = 0, name = strtoken(&p, parv[2], ","); name; name = strtoken(&p,
NULL, ","))
{
sendto_one(sptr, err_str(ERR_NOSUCHCHANNEL), me.name, parv[0],
parv[2]);
return 0;
}
if (!(lp = find_membership_link(acptr->user->channel, chptr)))
{
sendto_one(sptr, err_str(ERR_USERNOTINCHANNEL), me.name, parv[0],
parv[1], parv[2]);
return 0;
if (!(chptr = get_channel(acptr, name, 0)))
{
sendto_one(sptr, err_str(ERR_NOSUCHCHANNEL), me.name, parv[0],
name);
continue;
}
if (!(lp = find_membership_link(acptr->user->channel, chptr)))
{
sendto_one(sptr, err_str(ERR_USERNOTINCHANNEL), me.name, parv[0],
parv[1], name);
continue;
}
if (*jbuf)
(void)strlcat(jbuf, ",", sizeof jbuf);
(void)strlncat(jbuf, name, sizeof jbuf, sizeof(jbuf) - i - 1);
i += strlen(name) + 1;
}
if (!*jbuf)
return -1;
strcpy(parv[2], jbuf);
if (comment)
{
sendto_realops("%s used SAPART to make %s part %s (%s)", sptr->name, parv[1],
parv[2], comment);
sendto_serv_butone(&me, ":%s GLOBOPS :%s used SAPART to make %s part %s (%s)",
me.name, sptr->name, parv[1], parv[2], comment);
/* Logging function added by XeRXeS */
ircd_log(LOG_SACMDS,"SAPART: %s used SAPART to make %s part %s (%s)",
sptr->name, parv[1], parv[2], comment);
@ -140,6 +164,8 @@ DLLFUNC CMD_FUNC(m_sapart)
{
sendto_realops("%s used SAPART to make %s part %s", sptr->name, parv[1],
parv[2]);
sendto_serv_butone(&me, ":%s GLOBOPS :%s used SAPART to make %s part %s",
me.name, sptr->name, parv[1], parv[2]);
/* Logging function added by XeRXeS */
ircd_log(LOG_SACMDS,"SAPART: %s used SAPART to make %s part %s",
sptr->name, parv[1], parv[2]);