1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 11:13:13 +02:00

- WebTV fixes

This commit is contained in:
Bram Matthys
2003-02-28 14:40:11 +00:00
parent a28a349eb2
commit d435c5becf
3 changed files with 22 additions and 8 deletions
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}