Author Topic: Join/part/quit messages  (Read 7100 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Join/part/quit messages
« on: June 19, 2011, 05:44:56 pm »
aren't showing up anymore :(

EDIT: I lied. Join/part messages do show up, but not quits.
« Last Edit: June 19, 2011, 05:45:53 pm by Deep Thought »




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Join/part/quit messages
« Reply #1 on: June 19, 2011, 05:49:18 pm »
Yeah I noticed ???

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Join/part/quit messages
« Reply #2 on: June 19, 2011, 06:37:14 pm »
Another bug...all joins show as [6:00:00 PM] (at least in this time zone) until refresh.
Vy'o'us pleorsdti thl'e gjaemue

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Join/part/quit messages
« Reply #3 on: June 20, 2011, 04:14:00 pm »
Netham, bug fix:

Change the sql query in load.php on line 57 to

Code: (SQL) [Select]
SELECT * FROM `irc_lines`
WHERE `channel` = '%s'
OR
`type` = 'quit'
ORDER BY `line_number` DESC
LIMIT %s

I added the quit line checking. Maybe you need to do some more mods though.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Join/part/quit messages
« Reply #4 on: June 20, 2011, 05:51:04 pm »
That'd display every quit in every channel. There's a piece of code in the bot, I can't exactly remember what function.

Though, I could make it so all quits are pulled, and check the userlist on the client and only display if that's good...
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Join/part/quit messages
« Reply #5 on: June 21, 2011, 04:22:40 am »
I hope you can put quit messages back, because it's kinda confusing right now X.x

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Join/part/quit messages
« Reply #6 on: June 21, 2011, 04:44:04 am »
Netham45, here is what fixes it for me (in the bot):

Add
Code: (PHP) [Select]
$channel = str_replace(':', '', $channel);
if (!isset($userList[$channel])) $userList[$channel] = Array();
array_push($userList[$channel], $username);
to userJoin() in the bot. That should populate the userList Array, and since you made all the other functions for quit it automagickly works :)

I must say that the code is very very clear, so good job again!

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Join/part/quit messages
« Reply #7 on: June 21, 2011, 05:08:12 pm »
Aha, I forgot to add the users to the array on join. D:


Also,
Code: [Select]
if (!isset($userList[$channel])) $userList[$channel] = Array();
*should* be unnecessary. PHP should automatically treat it as an array if you give it a key. That being said, it doesn't hurt.

Edit: Fixed it. Thanks.
« Last Edit: June 21, 2011, 05:10:32 pm by Netham45 »
Omnimaga Admin

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Join/part/quit messages
« Reply #8 on: June 21, 2011, 05:38:46 pm »
The thing is that is didn't want to work properly without that line, so I don't know what happened there.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Join/part/quit messages
« Reply #9 on: June 21, 2011, 06:23:47 pm »
they werent getting added to the userlist past the initial whos, so it didnt know when they quit.
Omnimaga Admin

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Join/part/quit messages
« Reply #10 on: June 21, 2011, 09:10:06 pm »
Seems like posts from Omnom don't show up until a refresh after anyone joins/parts. Whatever I send in Omnom still shows up in IRC but Omnom doesn't get refreshed.




Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Join/part/quit messages
« Reply #11 on: June 21, 2011, 10:02:31 pm »
It's working fine for me. What browser, have you cleared cache, etc...?
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Join/part/quit messages
« Reply #12 on: June 22, 2011, 01:00:50 am »
I see quit messages are back now. Nice work Netham45.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Join/part/quit messages
« Reply #13 on: June 22, 2011, 01:23:24 am »
Thank Jim too, he's the guy who pointed out my really stupid mistake. xD
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Join/part/quit messages
« Reply #14 on: June 22, 2011, 03:08:28 pm »
Ah ok. On a side note last night I think DSP_Lord's quit showed up twice once. ??? I do not know if it was because he's on OmniNet because the ping timeouts were the same and I do not remember OmniNet being linked back.