Author Topic: Spybot45 Dev Ideas  (Read 4934 times)

0 Members and 1 Guest are viewing this topic.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Spybot45 Dev Ideas
« on: May 10, 2011, 01:44:16 am »
Since I can get external access to the Omni DB, I'ma do something like this for SpyBot45.


Code: (pseudo -almost- PHP code) [Select]
message = mysql_fetch_array(sql_query("SELECT MAX(`id_msg`) FROM `omnitempboard_messages`"));
mID = message[`ID_MSG`];
tID = message[`ID_TOPIC`];
mPoster = message[`posterName`];

topic = mysql_fetch_array(sql_query("SELECT * FROM `omnitempboard_topics` WHERE `id_topic` = %s",tID));
tBoard = topic['ID_BOARD'];
tFirstID = topic['ID_FIRST_MSG'];

fMessage = mysql_fetch_array(sql_query("SELECT * FROM `omnitempboard_messages` WHERE `id_msg` = %s",tFirstID));

tTopicName = fMessage['subject'];

echo sprintf("New Post by %s in %s http://omniurl.tk/%i/%i", mPoster,tTopicName,tID,mID);


I hate SQL sometimes. SMF DB layout even more.

What this does is:

  • Request the most recent post
  • record name, threadid
  • Request the thread associated
  • record first post ID(thread subject), board id(for filtering)
  • Request the first post in the thread
  • Record its subject, it's the title of the thread

That's actually almost all that's required for it, I just need to get it done. That will make it so the site won't slow down really bad when posting if my server is acting up. Right now it's requesting a PHP page off my server every post.
« Last Edit: May 10, 2011, 01:45:54 am by Netham45 »
Omnimaga Admin

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Spybot45 Dev Ideas
« Reply #1 on: May 10, 2011, 07:53:56 am »
I see, so that's especially good if your server is down.  I like how we are making these things less dependent on two servers working perfectly.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Spybot45 Dev Ideas
« Reply #2 on: May 10, 2011, 02:52:30 pm »
Got it done, posted the source to it in the source thread. Now if Omni hangs making a post, it's not mah fault. :P
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: Spybot45 Dev Ideas
« Reply #3 on: May 10, 2011, 03:10:23 pm »
This is awesome! Hopefully fewer slow downs should occur. :D

EDIT: Netham45, a suggestion for Spybot45 would be to use the display name instead of the user name for post notices. For example, it should say New post by GB instead of New post by Georges W. Bush.


Also do you think you could add TIMGUL notifications to spybot45? That board might eventually merge with Omni anyway (or close).
« Last Edit: May 10, 2011, 04:45:49 pm by DJ_O »

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Spybot45 Dev Ideas
« Reply #4 on: May 10, 2011, 06:04:51 pm »
If it merges with Omni, yea. If it stays on 1and1, no. I don't have SQL access to 1and1.
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: Spybot45 Dev Ideas
« Reply #5 on: May 10, 2011, 06:21:05 pm »
Well I can give you access, although I don't know if the PHP code would work, since it uses SMF 2.0 and I recall 1and1 not working with certain PHP sending commands.

Also will the new spybot still be capped at 1 post detected per second? I remember it wasn't before and it would just flood the channel non-stop until it's banned, due to a glitch when two posts are made at once. Or is that fixed now?

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Spybot45 Dev Ideas
« Reply #6 on: May 10, 2011, 08:33:25 pm »
I don't have SQL access from my server to 1and1, they don't open it like Aspiration does. I'd be able to make it use the PHP mod, though(the previous version of spybot)
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: Spybot45 Dev Ideas
« Reply #7 on: May 10, 2011, 11:10:46 pm »
I think you forgot to keep the cutoff limit for topic titles. SpyBot cut them off at 30 characters.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Spybot45 Dev Ideas
« Reply #8 on: May 10, 2011, 11:11:45 pm »
fix'd.
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: Spybot45 Dev Ideas
« Reply #9 on: May 10, 2011, 11:12:33 pm »
Ok good. I am a bit worried it will make OmnomIRC hard to use on lower resolutions. On lower res, we already have to manually scroll down to see the entire text. X.x

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: Spybot45 Dev Ideas
« Reply #10 on: May 11, 2011, 05:56:39 pm »
-Snip-

Removed the bug report 'cause I don't want people abusing it

--Netham

EDIT: THE GAME Why Netgham45 D:
« Last Edit: May 11, 2011, 06:01:17 pm by DJ_O »