Extend AOChat class for 1k+ buddylist and spambots etc

Questions, comments, suggestions, and bug reports
equi
Member
Posts: 45
Joined: Sun May 24, 2015 9:39 am
antispam: rimor

Extend AOChat class for 1k+ buddylist and spambots etc

Postby equi » Wed Nov 09, 2016 10:11 pm

Hi,
is it possible to modificate the bot in a way, that ther can be more than 1k+ buddies and use the other AOChats as spamchannels/bots?
I know the thing with AOChatproxy (didnt tried it yet) but as far as i can see it only increases the capacity of the buddylist (i dont like the java thingy and the "two things" start thing, better have all in one).
Im just thinking about to modificate the AOChat.class.php and AOChatQueue.class.php in a way that the old commands/etc stay in place, so that there wont be big changes necessary.
The module could only send messages through the slaves if maybe AOC_PRIORITY_LOW is or a special tell-function is called.
Thinking about something like:

Code: Select all

main       receive/send etc               --> Hellcom
slave        distribute tells, handle buddies            --> Hellcom1, Hellcom2, Hellcom3....
subchan          for raids like s42 west etc and loot               --> Hellwest, Helleast, Hellnorth

for subchan than some added command like: $this->chatBot->sendSubChan('Raffle started!", $subchan);
or massmessage: $this->chatBot->sendSpam('blubb!", $name); or array of names

Hope you know what i mean^^ Do you think its possible to integrate something like this without changing the whole system? I think the handling of ChatQueue needs a total refresh then :lol:
What you thinking about it?
Tyrence
Posts: 1935
Joined: Sat Jan 09, 2010 1:32 am

Re: Extend AOChat class for 1k+ buddylist and spambots etc

Postby Tyrence » Thu Nov 10, 2016 12:52 am

Hmm, it's an interesting question. At the time I wrote the AOChatProxy, I would say that it was not possible to do what you are asking for in PHP (which is the language Budabot is written in). Now, I would say it's probably possible, but I'm not sure how well it would work.

Right now, the bot runs in a loop that looks like this (simplified of course):

1) check if any new data has come in
2) wait for 100ms
3) go back to 1)

You can see this in the method here and the methods that it calls: https://github.com/Budabot/Budabot/blob ... #L183-L198

What you are talking about is making multiple connections to the chat server. So the new loop would look something like this:

1) check if any new data has come in on connection 1
2) check if any new data has come in on connection 2
3) check the rest of the connections...
4) wait for 100ms (some amount of wait is necessary, otherwise it will spike your cpu usage to 100%)
5) go back to 1)

So in theory, it would work, but to make it work well would take a lot of tweaking and I'm not sure exactly how well it would work.

To be honest, this is intriguing to me, and part of me wants to take on the challenge, but I don't know that I have the drive to finish it now, or the time to even start it. :) But in truth, if time and effort wasn't an issue, I would rewrite Budabot in another language that would make a task like this a lot easier and straightforward.
"Those who expect to reap the blessings of freedom, must, like men, undergo the fatigues of supporting it." — Thomas Paine
"Nearly all men stand adversity, but if you want to test a man's character, give him power." — Abraham Lincoln
Budabot Releases and Downloads: https://github.com/Budabot/Budabot/releases
equi
Member
Posts: 45
Joined: Sun May 24, 2015 9:39 am
antispam: rimor

Re: Extend AOChat class for 1k+ buddylist and spambots etc

Postby equi » Thu Nov 10, 2016 10:32 am

Hehe^^ yeah something like that had i in mind.
Guess its so difficult because the core code is so nested :lol:
In which language would you write it now?
Tyrence
Posts: 1935
Joined: Sat Jan 09, 2010 1:32 am

Re: Extend AOChat class for 1k+ buddylist and spambots etc

Postby Tyrence » Fri Nov 11, 2016 5:29 am

Well for me personally, I'd write it in a JVM language, since that is my background, but a .NET language would do as well, or possibly Python or Node.js.
"Those who expect to reap the blessings of freedom, must, like men, undergo the fatigues of supporting it." — Thomas Paine
"Nearly all men stand adversity, but if you want to test a man's character, give him power." — Abraham Lincoln
Budabot Releases and Downloads: https://github.com/Budabot/Budabot/releases
equi
Member
Posts: 45
Joined: Sun May 24, 2015 9:39 am
antispam: rimor

Re: Extend AOChat class for 1k+ buddylist and spambots etc

Postby equi » Sat Nov 12, 2016 12:38 am

i updated Doomdump, which was written in c# .NET language and i dont like it^^ Python ok, yeah maybe best would be JVM.
If i got time im gonna have a close look into the core of budabot

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest