mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-05 11:13:13 +02:00
- WebTV fixes
This commit is contained in:
@@ -1951,3 +1951,4 @@ seen. gmtime warning still there
|
||||
- Added SVSWATCH: allows U-lined server to modify the watch list of a user.
|
||||
- Added SVSSILENCE: allows U-lined server to modify the silence list of a user.
|
||||
- Documentation/text updates.
|
||||
- WebTV fixes
|
||||
|
||||
+16
-5
@@ -136,6 +136,7 @@ int m_message_Unload(int module_unload)
|
||||
** rev argv 6/91
|
||||
**
|
||||
*/
|
||||
static int recursive_webtv = 0;
|
||||
DLLFUNC int m_message(aClient *cptr, aClient *sptr, int parc, char *parv[], int notice)
|
||||
{
|
||||
aClient *acptr;
|
||||
@@ -198,17 +199,27 @@ DLLFUNC int m_message(aClient *cptr, aClient *sptr, int parc, char *parv[], int
|
||||
*/
|
||||
if (!strcasecmp(nick, "ircd") && MyClient(sptr))
|
||||
{
|
||||
parse(sptr, parv[2], (parv[2] + strlen(parv[2])));
|
||||
if (!recursive_webtv)
|
||||
{
|
||||
recursive_webtv = 1;
|
||||
parse(sptr, parv[2], (parv[2] + strlen(parv[2])));
|
||||
recursive_webtv = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!strcasecmp(nick, "irc") && MyClient(sptr))
|
||||
{
|
||||
if (webtv_parse(sptr, parv[2]) == -2)
|
||||
if (!recursive_webtv)
|
||||
{
|
||||
parse(sptr, parv[2],
|
||||
(parv[2] + strlen(parv[2])));
|
||||
recursive_webtv = 1;
|
||||
if (webtv_parse(sptr, parv[2]) == -2)
|
||||
{
|
||||
parse(sptr, parv[2],
|
||||
(parv[2] + strlen(parv[2])));
|
||||
}
|
||||
recursive_webtv = 0;
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (*nick != '#' && (acptr = find_person(nick, NULL)))
|
||||
{
|
||||
|
||||
+5
-3
@@ -60,7 +60,7 @@ aMessage webtv_cmds[] =
|
||||
int webtv_parse(aClient *sptr, char *string)
|
||||
{
|
||||
char *cmd = NULL, *s = NULL;
|
||||
int i;
|
||||
int i, n;
|
||||
aMessage *message = webtv_cmds;
|
||||
static char *para[16];
|
||||
|
||||
@@ -69,7 +69,8 @@ int webtv_parse(aClient *sptr, char *string)
|
||||
sendto_one(sptr, ":IRC %s %s :No command given", MSG_PRIVATE, sptr->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
n = strlen(string);
|
||||
cmd = strtok(string, " ");
|
||||
if (!cmd)
|
||||
return -2;
|
||||
@@ -83,7 +84,8 @@ int webtv_parse(aClient *sptr, char *string)
|
||||
/* sendto_one(sptr, ":IRC %s %s :Sorry, \"%s\" is an unknown command to me",
|
||||
MSG_PRIVATE, sptr->name, cmd); */
|
||||
/* restore the string*/
|
||||
cmd[strlen(cmd)]= ' ';
|
||||
if (strlen(cmd) < n)
|
||||
cmd[strlen(cmd)]= ' ';
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user