Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Mervbot + .NET
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  ctf plugin error Post :: Post Merver Freq register plugin request  View next topic  
Author Message
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun May 01, 2005 11:19 am    Post subject: Reply to topic Reply with quote

Are you kidding? Multi-threaded plugins would go absolutely insane with synchronization! It would require a re-write of essentially the entire MERVBot code and all existing plugins...

You should really read up on threads and the problems associated with them before you start suggesting their use. icon_razz.gif
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sun May 01, 2005 11:53 am    Post subject: Reply to topic Reply with quote

oooh cool lol
Well I was only thinking about the good sides of threading then of the bad sides ;p
(got kinda sick one plugin can d/c the whole bot lol)
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun May 01, 2005 12:27 pm    Post subject: Reply to topic Reply with quote

Try, and catch.
Back to top
View users profile Send private message Add User to Ignore List
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun May 01, 2005 1:04 pm    Post subject: Reply to topic Reply with quote

Just wait until ekted releases powerbot. I'm not sure when that will be though, and the core will probably remain closed-source.
In my opinion, powerbot is far superior to mervbot, just the mysql support will blow your load. The documentation is awesome, plus everything you need is in one header file.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sun May 01, 2005 2:08 pm    Post subject: Reply to topic Reply with quote

neato biggrin.gif

(However I would hate to port all my mervbot plugins to powerbot though lol)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Mon May 02, 2005 3:17 am    Post subject: Reply to topic Reply with quote

Maverick wrote:
Do you, or anyone else, know if you can specify more then one IP at botsip server.ini setting? (I assume comma seperated if its possible)

Anyone know?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:35
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2019
Offline

PostPosted: Mon May 02, 2005 3:34 am    Post subject: Reply to topic Reply with quote

No, it's not possible. If you enter more than one, it'll look only at the first IP.
Back to top
View users profile Send private message Add User to Ignore List
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Mon May 02, 2005 5:35 am    Post subject: Reply to topic Reply with quote

bah, too bad
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
liito-orava
Novice


Gender:Gender:Male
Joined: Sep 24 2003
Posts: 41
Offline

PostPosted: Mon May 02, 2005 6:59 am    Post subject: Reply to topic Reply with quote

Guess would need to set somekind of proxy thing so that it'd look like all are from same IP or use shared connection..

It's quite surprising that since such feature was added to subgame they didn't make multiple ip's configurable to it.
_________________
"Do you hear that? That is the sound of nobody giving a fuck!"
Wolfix> Lesbian transvestites trapped in man's bodies spanking their monkeys to freq 395
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon May 02, 2005 12:45 pm    Post subject: Reply to topic Reply with quote

Try and catch? What does that have to do with this?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon May 02, 2005 1:18 pm    Post subject: Reply to topic Reply with quote

Heh, Cyan, I was waiting for someone to ask about it. sa_tongue.gif
I might be wrong ^ 2 here, but as what Mav said "(got kinda sick one plugin can d/c the whole bot lol)" I think he complains there about it how plugins can mess the whole bot up when something fails.
But, I guess in the newer versions catid already prevented plugins from crashing the bot, so that might not be what he meant.

I was thinking about using try and catch to prevent the code from crashing the bot, but, after all I think I was wrong.

Let's ask Mav what he actually meant with that, function calls deadlocking the bot or something?

Heh, liito-orava, as I think I've seen in other posts of yours, what you're saying in your post here is irrelevant to the topic, maybe more than what I said. sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Mon May 02, 2005 4:36 pm    Post subject: Reply to topic Reply with quote

What I exactly meant was that when a single plugin takes up 100% CPU time for a single operation it can d/c one or multiple bots/spawns since its unresponsive and gets d/c due to no data.
Bot crashes are more the fault of the coder of the plugin, and indeed, catid thought of that and made a catch method for it icon_smile.gif
Having the bot threaded would solve this problem (i think).
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon May 02, 2005 5:52 pm    Post subject: Reply to topic Reply with quote

How would another thread solve the issue if the plugin's taking the whole CPU for itself already?
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Mon May 02, 2005 8:24 pm    Post subject: Reply to topic Reply with quote

Because with the sockets on another thread it wouldn't timeout while waiting for a plugin to do something?
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue May 03, 2005 6:21 am    Post subject: Reply to topic Reply with quote

Exactly
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Tue May 03, 2005 1:35 pm    Post subject: Reply to topic Reply with quote

The point of my post, was, in theory: If the CPU hangs on one thread, how would it be able to run the other one then? sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue May 03, 2005 4:15 pm    Post subject: Reply to topic Reply with quote

He means that if one plugin (which would be in its own thread) deadlocks, it won't deadlock the entire bot, which would be true. But it's quite impractical to have each plugin in its own thread.

Now what would be good is to have each spawn in its own thread.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue May 03, 2005 5:13 pm    Post subject: Reply to topic Reply with quote

yea, agreed cyan~fire
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue May 03, 2005 9:20 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide
//////// Multi-threading ////////

DWORD WINAPI ReceiveLoop(LPVOID parameter)
{
   Host *h = (Host *)parameter;
   UDPPacket packet;
   int len, FromLen = sizeof(INADDR);

   while (len = recvfrom(h->sid, packet.msg, PACKET_MAX_LENGTH, 0, packet.src.getAddress(), &FromLen))
   {
      WaitForSingleObject(h->mutex, INFINITE);
      packet.len = len;
      if (h->validateSource(packet.src))
      {
         h->gotPacket(packet.msg, packet.len);
         if (h->killMe)
         {
            ReleaseMutex(h->mutex);
            break;
         }
      }
      ReleaseMutex(h->mutex);
   }

   SetEvent(h->done); //any better way of telling when a thread exits?

   return 0;
}


It's working. (Shhh, Ekted, don't criticize my code, it's just a hack for now!)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 148 page(s) served in previous 5 minutes.

phpBB Created this page in 0.629951 seconds : 43 queries executed (93.4%): GZIP compression disabled