mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 07:23:12 +02:00
various bug fixes and updates
This commit is contained in:
@@ -2259,3 +2259,7 @@ seen. gmtime warning still there
|
||||
- Added a system to allow modules to create snomasks using functions SnomaskAdd and SnomaskDel
|
||||
- Fixed ban version crash and another read-after-free.
|
||||
- Fixed problem with make custommodule and multiple EXLIBS arguments (EXLIBS="-la -lb -lc").
|
||||
- Fixed a bug with +b and +e involving how trimming should occur when a mask is too long.
|
||||
(#0001103) reported by Troco.
|
||||
- Fixed a bug in aliases reported by darko``
|
||||
- Updated help.conf and unreal32docs.html (#0001111) reported by SciFi, AngryWolf, and Zerwas.
|
||||
|
||||
+35
-6
@@ -21,7 +21,7 @@
|
||||
<font size="4"><a href="http://www.unrealircd.com">http://www.unrealircd.com</a></font><br>
|
||||
<font size="4">Version: 3.2</font><br>
|
||||
<b>Current Version:</b> 3.2 Beta17<br>
|
||||
<b>Last doc update:</b> 2003-06-22 </div>
|
||||
<b>Last doc update:</b> 2003-07-13 </div>
|
||||
<b>Head Coders:</b> Stskeeps / codemastr / Luke / McSkaf / Syzop<br>
|
||||
<b>Contributors:</b> Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk<br>
|
||||
<b>Documentation:</b> CKnight^ / Syzop<br>
|
||||
@@ -1998,7 +1998,7 @@ set {
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">d</div></td>
|
||||
<td>Makes it so you can not receive private messages</td>
|
||||
<td>Makes it so you can not receive channel PRIVMSGs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">k</div></td>
|
||||
@@ -2028,6 +2028,18 @@ set {
|
||||
<td><div align="center">p</div></td>
|
||||
<td>Hides the channels you are in in a /whois reply</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">R</div></td>
|
||||
<td>Allows you to only receive PRIVMSGs/NOTICEs from registered (+r) users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">V</div></td>
|
||||
<td>Marks you as a WebTV user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">z</div></td>
|
||||
<td>Indicates that you are an SSL client</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p></p></div>
|
||||
<p><font size="+2"><b>7 – User & Oper Commands Table<a name="useropercommands" id="useropercommands"></a></b></font></p><div class="desc">
|
||||
@@ -2077,9 +2089,9 @@ to get more information on a command.</p>
|
||||
<td>All</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="39">part <channel1, channel2, ...></td>
|
||||
<td>Allows you to part (leave) channels. Using the /part #channel1, #channel2,
|
||||
channel3 will allow you to part more than one channel at a time. </td>
|
||||
<td height="39">cycle <channel1, channel2, ...></td>
|
||||
<td>Cycles the given channel(s). This command is equivilent
|
||||
to sending a PART then a JOIN command.</td>
|
||||
<td>All</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -2253,6 +2265,15 @@ to get more information on a command.</p>
|
||||
of a channel.<br></td>
|
||||
<td>All</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="39">dns <option></td>
|
||||
<td>Returns information about the IRC server's DNS cache.
|
||||
Note, since most clients have a builtin DNS command,
|
||||
you will most likely need to use /raw DNS to use this.
|
||||
Opers may specify an l as the first parameter to the command
|
||||
to receive a list of entries in the DNS cache.</td>
|
||||
<td>All</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="39">oper <userid> <password><br></td>
|
||||
<td>Command to give a user operator status if they match an Oper Block<br></td>
|
||||
@@ -2530,14 +2551,22 @@ to get more information on a command.</p>
|
||||
V - Send the vhost block list<br>
|
||||
y - Send the class block list<br>
|
||||
Z - Send memory usage information</td>
|
||||
<td>Admin</td>
|
||||
<td>All</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="36">module<br></td>
|
||||
<td>
|
||||
Lists all loaded modules
|
||||
</td>
|
||||
<td>Admin</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="36">close<br></td>
|
||||
<td>
|
||||
This command will disconnect all unknown connections from the IRC server.
|
||||
</td>
|
||||
<td>IRCOp</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p></p></div>
|
||||
|
||||
@@ -35,8 +35,8 @@ help Usercmds {
|
||||
" AWAY LINKS NOTICE SILENCE WHO";
|
||||
" CREDITS LIST PART STATS WHOIS";
|
||||
" INVITE LUSERS PING TIME WHOWAS";
|
||||
" ISON MAP PONG TOPIC";
|
||||
" JOIN MODE PRIVMSG USERHOST";
|
||||
" ISON MAP PONG TOPIC CYCLE";
|
||||
" JOIN MODE PRIVMSG USERHOST DNS";
|
||||
" KICK MOTD QUIT VERSION";
|
||||
" KNOCK NAMES RULES VHOST";
|
||||
" ==-----------------oOo-----------------==";
|
||||
@@ -56,7 +56,7 @@ help Opercmds {
|
||||
" LAG SETHOST SETIDENT CHGHOST CHGIDENT";
|
||||
" CHGNAME SQUIT CONNECT DCCDENY UNDCCDENY";
|
||||
" SAJOIN SAPART SAMODE RPING TRACE";
|
||||
" OPERMOTD SDESC MKPASSWD";
|
||||
" OPERMOTD SDESC MKPASSWD CLOSE";
|
||||
" ==----------------oOo---------------==";
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ help Umodes {
|
||||
" B = Marks you as being a Bot";
|
||||
" G = Filters out all Bad words in your messages with <censored>";
|
||||
" H = Hide IRCop status in /WHO and /WHOIS. (IRC Operators only)";
|
||||
" R = Allows you to only receive PRIVMSGs from registered (+r) users";
|
||||
" R = Allows you to only receive PRIVMSGs/NOTICEs from registered (+r) users";
|
||||
" S = For Services only. (Protects them)";
|
||||
" V = Marks the client as a WebTV user";
|
||||
" W = Lets you see when people do a /WHOIS on you (IRC Operators only)";
|
||||
@@ -263,6 +263,26 @@ help Whowas {
|
||||
" Example: WHOWAS hAtbLaDe";
|
||||
};
|
||||
|
||||
help Cycle {
|
||||
" Cycles the given channel(s). This command is equivilent";
|
||||
" to sending a PART then a JOIN command.";
|
||||
" -";
|
||||
" Syntax: CYCLE <chan1>,<chan2>,<chan3>";
|
||||
" Example: CYCLE #help";
|
||||
" Example: CYCLE #main,#chat";
|
||||
};
|
||||
|
||||
help Dns {
|
||||
" Returns information about the IRC server's DNS cache.";
|
||||
" Note, since most clients have a builtin DNS command,";
|
||||
" you will most likely need to use /raw DNS to use this.";
|
||||
" Opers may specify an l as the first parameter to the command";
|
||||
" to receive a list of entries in the DNS cache.";
|
||||
" -";
|
||||
"Syntax: DNS";
|
||||
"Syntax: DNS l (Oper only)";
|
||||
};
|
||||
|
||||
help Names {
|
||||
" Provides a list of users on the specified channel.";
|
||||
" -";
|
||||
@@ -902,6 +922,13 @@ help Mkpasswd {
|
||||
" Example: MKPASSWD crypt mpsare";
|
||||
};
|
||||
|
||||
help Close {
|
||||
" This command will disconnect all unknown connections from the";
|
||||
" IRC server.";
|
||||
" -";
|
||||
" Syntax: CLOSE";
|
||||
};
|
||||
|
||||
help Tsctl {
|
||||
" This is a highly advanced command used to Adjust the";
|
||||
" Internal IRC clock.";
|
||||
|
||||
+37
-2
@@ -73,6 +73,7 @@ extern int lifesux;
|
||||
/* Some forward declarations */
|
||||
CMD_FUNC(do_join);
|
||||
static void add_invite(aClient *, aChannel *);
|
||||
static char *clean_ban_mask(char *);
|
||||
static int add_banid(aClient *, aChannel *, char *);
|
||||
static int can_join(aClient *, aClient *, aChannel *, char *, char *,
|
||||
char **);
|
||||
@@ -1968,7 +1969,7 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param,
|
||||
break;
|
||||
}
|
||||
retval = 1;
|
||||
tmpstr = pretty_mask(param);
|
||||
tmpstr = clean_ban_mask(param);
|
||||
/* For bounce, we don't really need to worry whether
|
||||
* or not it exists on our server. We'll just always
|
||||
* bounce it. */
|
||||
@@ -1987,7 +1988,7 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param,
|
||||
break;
|
||||
}
|
||||
retval = 1;
|
||||
tmpstr = pretty_mask(param);
|
||||
tmpstr = clean_ban_mask(param);
|
||||
/* For bounce, we don't really need to worry whether
|
||||
* or not it exists on our server. We'll just always
|
||||
* bounce it. */
|
||||
@@ -2402,6 +2403,40 @@ char *pretty_mask(char *mask)
|
||||
return make_nick_user_host(NULL, NULL, cp);
|
||||
return make_nick_user_host(cp, user, host);
|
||||
}
|
||||
|
||||
char *trim_str(char *str, int len)
|
||||
{
|
||||
int l;
|
||||
if ((l = strlen(str)) > len)
|
||||
{
|
||||
str += l - len;
|
||||
*str = '*';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
char *clean_ban_mask(char *mask)
|
||||
{
|
||||
char *cp;
|
||||
char *user;
|
||||
char *host;
|
||||
|
||||
if ((user = index((cp = mask), '!')))
|
||||
*user++ = '\0';
|
||||
if ((host = rindex(user ? user : cp, '@')))
|
||||
{
|
||||
*host++ = '\0';
|
||||
|
||||
if (!user)
|
||||
return make_nick_user_host(NULL, trim_str(cp,USERLEN),
|
||||
trim_str(host,HOSTLEN));
|
||||
}
|
||||
else if (!user && index(cp, '.'))
|
||||
return make_nick_user_host(NULL, NULL, trim_str(cp,HOSTLEN));
|
||||
return make_nick_user_host(trim_str(cp,NICKLEN), trim_str(user,USERLEN),
|
||||
trim_str(host,HOSTLEN));
|
||||
}
|
||||
|
||||
/* Now let _invited_ people join thru bans, +i and +l.
|
||||
* Checking if an invite exist could be done only if a block exists,
|
||||
* but I'm not too fancy of the complicated structure that'd cause,
|
||||
|
||||
+33
-5
@@ -278,7 +278,6 @@ int m_alias(aClient *cptr, aClient *sptr, int parc, char *parv[], char *cmd) {
|
||||
char output[501];
|
||||
char nums[4];
|
||||
char *current = MyMalloc(strlen(parv[1])+1);
|
||||
char *xparv[3];
|
||||
bzero(current, strlen(parv[1])+1);
|
||||
bzero(output, sizeof output);
|
||||
while(format->parameters[i] && j < 500) {
|
||||
@@ -317,10 +316,39 @@ int m_alias(aClient *cptr, aClient *sptr, int parc, char *parv[], char *cmd) {
|
||||
output[j++] = format->parameters[i++];
|
||||
}
|
||||
output[j] = 0;
|
||||
xparv[0] = parv[0];
|
||||
xparv[1] = output;
|
||||
xparv[2] = NULL;
|
||||
m_alias(cptr, sptr, 2, xparv, format->nick);
|
||||
if (format->type == ALIAS_SERVICES) {
|
||||
if (SERVICES_NAME && (acptr = find_person(format->nick, NULL)))
|
||||
sendto_one(acptr, ":%s %s %s@%s :%s", parv[0],
|
||||
IsToken(acptr->from) ? TOK_PRIVATE : MSG_PRIVATE,
|
||||
format->nick, SERVICES_NAME, output);
|
||||
else
|
||||
sendto_one(sptr, err_str(ERR_SERVICESDOWN), me.name,
|
||||
parv[0], format->nick);
|
||||
}
|
||||
else if (format->type == ALIAS_STATS) {
|
||||
if (STATS_SERVER && (acptr = find_person(format->nick, NULL)))
|
||||
sendto_one(acptr, ":%s %s %s@%s :%s", parv[0],
|
||||
IsToken(acptr->from) ? TOK_PRIVATE : MSG_PRIVATE,
|
||||
format->nick, STATS_SERVER, output);
|
||||
else
|
||||
sendto_one(sptr, err_str(ERR_SERVICESDOWN), me.name,
|
||||
parv[0], format->nick);
|
||||
}
|
||||
else if (format->type == ALIAS_NORMAL) {
|
||||
if ((acptr = find_person(format->nick, NULL))) {
|
||||
if (MyClient(acptr))
|
||||
sendto_one(acptr, ":%s!%s@%s PRIVMSG %s :%s", parv[0],
|
||||
sptr->user->username, IsHidden(sptr) ? sptr->user->virthost : sptr->user->realhost,
|
||||
format->nick, output);
|
||||
else
|
||||
sendto_one(acptr, ":%s %s %s :%s", parv[0],
|
||||
IsToken(acptr->from) ? TOK_PRIVATE : MSG_PRIVATE,
|
||||
format->nick, output);
|
||||
}
|
||||
else
|
||||
sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name,
|
||||
parv[0], format->nick);
|
||||
}
|
||||
free(current);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user