diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-18 16:52:56 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-18 16:52:56 +0000 |
commit | 0f6de0b18372a76ebb5d6c4ba3dc9a7a7e0a7297 (patch) | |
tree | b16e5eb6b4d97bca39472ffea21d412c13ad71e2 /src/channels.cpp | |
parent | 3699bdaee53896b491256d3aa694ef20cbdb0743 (diff) |
set the TS of a channel in JoinUser, not after the entire FJOIN, this is safer and may fix the odd desync here and there
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6690 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 366169dd6..ce7cbb45c 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -176,7 +176,7 @@ CUList* chanrec::GetVoicedUsers() * add a channel to a user, creating the record for it if needed and linking * it to the user record */ -chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bool override, const char* key) +chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bool override, const char* key, time_t TS) { if (!user || !cn) return NULL; @@ -192,6 +192,9 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo if (!Ptr) { + if ((!IS_LOCAL(user)) && (!TS)) + Instance->Log(DEBUG,"*** BUG *** chanrec::JoinUser called for REMOTE user '%s' on channel '%s' but no TS given!", user->nick, cn); + privs = "@"; if (IS_LOCAL(user) && override == false) @@ -212,7 +215,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo if (IS_LOCAL(user)) Ptr->modes[CM_TOPICLOCK] = Ptr->modes[CM_NOEXTERNAL] = 1; - Ptr->created = Instance->Time(); + Ptr->created = TS ? TS : Instance->Time(); *Ptr->topic = 0; *Ptr->setby = 0; Ptr->topicset = 0; |