mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 00:03:12 +02:00
+- Added TS2ts (supporting the SJB64 stuff), and fixed the !0 timestamp bug
This commit is contained in:
@@ -670,3 +670,4 @@
|
||||
- Fixed a linking bug (where did that come from)
|
||||
- Fixed bug where duplicate numerics could occur
|
||||
- Fixed the hashing bug (thank you ROXnet ...)
|
||||
- Fixed a wierd channel message bug ||
|
||||
@@ -42,6 +42,7 @@ extern int bootopt;
|
||||
extern TS TSoffset;
|
||||
/* Prototype added to force errors -- Barubary */
|
||||
extern TS check_pings(TS now, int check_kills);
|
||||
extern TS TS2ts(char *s);
|
||||
|
||||
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
|
||||
|
||||
|
||||
+4
-7
@@ -1358,10 +1358,7 @@ int m_nick(cptr, sptr, parc, parv)
|
||||
*/
|
||||
if (parc > 3)
|
||||
{
|
||||
if (*parv[3] != '!')
|
||||
lastnick = atoi(parv[3]);
|
||||
else
|
||||
lastnick = xbase64dec(parv[3] + 1);
|
||||
lastnick = TS2ts(parv[3]);
|
||||
if (parc > 5)
|
||||
differ = (mycmp(acptr->user->username, parv[4])
|
||||
|| mycmp(acptr->user->realhost, parv[5]));
|
||||
@@ -1442,7 +1439,7 @@ int m_nick(cptr, sptr, parc, parv)
|
||||
** A NICK change has collided (e.g. message type ":old NICK new").
|
||||
*/
|
||||
if (parc > 2)
|
||||
lastnick = atoi(parv[2]);
|
||||
lastnick = TS2ts(parv[2]);
|
||||
differ = (mycmp(acptr->user->username, sptr->user->username) ||
|
||||
mycmp(acptr->user->realhost, sptr->user->realhost));
|
||||
sendto_failops
|
||||
@@ -1527,7 +1524,7 @@ int m_nick(cptr, sptr, parc, parv)
|
||||
if (parc > 2)
|
||||
sptr->hopcount = atoi(parv[2]);
|
||||
if (parc > 3)
|
||||
sptr->lastnick = atoi(parv[3]);
|
||||
sptr->lastnick = TS2ts(parv[3]);
|
||||
else /* Little bit better, as long as not all upgraded */
|
||||
sptr->lastnick = TStime();
|
||||
}
|
||||
@@ -1569,7 +1566,7 @@ int m_nick(cptr, sptr, parc, parv)
|
||||
!MyClient(sptr) && parc > 2
|
||||
&& atoi(parv[2]) < sptr->lastnick)
|
||||
sptr->lastnick = (MyClient(sptr)
|
||||
|| parc < 3) ? TStime() : atoi(parv[2]);
|
||||
|| parc < 3) ? TStime() : TS2ts(parv[2]);
|
||||
add_history(sptr, 1);
|
||||
sendto_common_channels(sptr, ":%s NICK :%s", parv[0], nick);
|
||||
sendto_serv_butone_token(cptr, parv[0], MSG_NICK, TOK_NICK,
|
||||
|
||||
@@ -39,6 +39,14 @@ extern void outofmemory();
|
||||
|
||||
#define is_enabled match
|
||||
|
||||
long TS2ts(char *s)
|
||||
{
|
||||
if (*s == '!')
|
||||
return (xbase64dec(s + 1));
|
||||
else
|
||||
return (atoi(s));
|
||||
}
|
||||
|
||||
char *my_itoa(int i)
|
||||
{
|
||||
static char buf[128];
|
||||
|
||||
Reference in New Issue
Block a user