Omnimaga

Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: Netham45 on May 10, 2011, 01:44:16 am

Title: Spybot45 Dev Ideas
Post by: Netham45 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:


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.
Title: Re: Spybot45 Dev Ideas
Post by: jnesselr 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.
Title: Re: Spybot45 Dev Ideas
Post by: Netham45 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
Title: Re: Spybot45 Dev Ideas
Post by: DJ Omnimaga 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).
Title: Re: Spybot45 Dev Ideas
Post by: Netham45 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.
Title: Re: Spybot45 Dev Ideas
Post by: DJ Omnimaga 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?
Title: Re: Spybot45 Dev Ideas
Post by: Netham45 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)
Title: Re: Spybot45 Dev Ideas
Post by: DJ Omnimaga 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.
Title: Re: Spybot45 Dev Ideas
Post by: Netham45 on May 10, 2011, 11:11:45 pm
fix'd.
Title: Re: Spybot45 Dev Ideas
Post by: DJ Omnimaga 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
Title: Re: Spybot45 Dev Ideas
Post by: DJ Omnimaga 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: