VikingBot icon indicating copy to clipboard operation
VikingBot copied to clipboard

created some new stuff for vikingbot

Open coderofsalvation opened this issue 13 years ago • 4 comments

Like the bot bro, and I found some time to create some fixes & plugins. Feel free to merge stuff from my fork into yours!

The Coder of Salvation

coderofsalvation avatar Aug 05 '12 16:08 coderofsalvation

Hi! Awesome, will have a look and do a merge back into Vikingbot ;)

Ueland avatar Aug 08 '12 16:08 Ueland

Hehe cool :)

Please have a critical look..especially at the system()-calls. For example the 'remindPlugin' (which remembers important links, or mentioning of nicknames):

I chose for system( escapeshellcmd("cat '{$msg}' >> log.txt"); because the >> and grep shellcommands are optimized for superfast dealing with large textfiles.

If I would call file_get_contents() and file_put_contents() instead, it would make the bot very slow for just appending a line to a large textfile.

Today on the way back home, I was thinking..isnt there a way we can achieve the same effect of >> with fopen() and fwrite() ? As in just opening the filepointer (not reading the whole data), and write to the end of the file.

hm lets think about it, rome wasnt build in one day :)

Leon

ps1. here's a 'vikingbot'-extension for the famous roundup issuetracker, feel free to mention it : https://gist.github.com/3295338 ps2. also do not..I repeat not merge the start.sh file. I tell you this because today in the morning I had to call my ISP to restart our webserver :) The problem was that I added this:

while 1: do

start bot

done

Not knowing that you already created a 'restart bot when things go wrong'-mechanism in php. The exec("start.sh &")-call spawned infinite bots with each containing a memory leak (I was working on a new plugin hehe).

On Wed, 8 Aug 2012, Tor Henning Ueland wrote:

Hi! Awesome, will have a look and do a merge back into Vikingbot ;)


Reply to this email directly or view it on GitHub: https://github.com/Ueland/VikingBot/issues/10#issuecomment-7588992

coderofsalvation avatar Aug 08 '12 19:08 coderofsalvation

Hi!

I havent forgotten this yet, i have not had time to go over / merge yet, but i have started now by adding a link to your roundout issue tracker plugin.

Ueland avatar Jan 18 '13 20:01 Ueland

I would suggest to close this. Most of the stuff is kind of specific. Plugins should be posted in own repositories.

hashworks avatar Dec 27 '14 22:12 hashworks