spamming skills messages

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
alph4
Noob
Noob
Posts: 3
Joined: 12 Apr 2008, 18:08

spamming skills messages

#1 Post by alph4 »

I'm trying to use a bot in Woe but i have some problems due to the lag caused by the spamming of a message in console: everytime a paladin uses devotion/sacrifice on a character the message gets repeated in the console many many many times causing lag.


Basically, the first message is a skill domain wich can be removed using the squelch options, but the other message spammed many times is a conosole domains which can not be turned off.

[console] Player xxxxx (22) uses devotion on player yyyyy (33)
[console] Player xxxxx (22) uses devotion on player yyyyy (33)
[console] Player xxxxx (22) uses devotion on player yyyyy (33)
[console] Player xxxxx (22) uses devotion on player yyyyy (33)
[console] Player xxxxx (22) uses devotion on player yyyyy (33)
[console] Player xxxxx (22) uses devotion on player yyyyy (33)

any suggestion how to disable that? thanks b4 for the information.

Motivus
Developers
Developers
Posts: 157
Joined: 04 Apr 2008, 13:33
Noob?: Yes

Re: spamming skills messages

#2 Post by Motivus »

The spam is because the devotion packet parse function doesn't add a status for the player and spams the message every time it is received. The devotion packet is received almost constantly in war of emperium.

Below fixes it with out breaking support for anything, because as far as I can tell devotion is not currently supported in kore.

Code: Select all

Index: src/Network/Receive.pm
===================================================================
--- src/Network/Receive.pm	(revision 6329)
+++ src/Network/Receive.pm	(working copy)
@@ -2289,21 +2289,22 @@
 	message T("Type 'deal' to start dealing, or 'deal no' to deny the deal.\n"), "deal";
 }
 
+#This function currently parses a packet and then does nothing with the information
 sub devotion {
 	my ($self, $args) = @_;
 
 	my $source = Actor::get($args->{sourceID});
-	my $msg = '';
+	#my $msg = '';
 
 	for (my $i = 0; $i < 5; $i++) {
 		my $ID = substr($args->{data}, $i*4, 4);
 		last if unpack("V", $ID) == 0;
 
 		my $actor = Actor::get($ID);
-		$msg .= skillUseNoDamage_string($source, $actor, 0, 'devotion');
+		#$msg .= skillUseNoDamage_string($source, $actor, 0, 'devotion');
 	}
 
-	message "$msg";
+	#message "$msg";
 }
 
 sub egg_list {
I'll add devotion code soon. I looked in to it and devotion status is managed entirely through 01 CF.
Oh no.

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: spamming skills messages

#3 Post by help_us »

Wah this better way :D .
:oops: i remove all msg skill at misc.pm and it make i cant see all skill at all :lol:
this help anyway ;) tQ
Image
Image

alph4
Noob
Noob
Posts: 3
Joined: 12 Apr 2008, 18:08

Re: spamming skills messages

#4 Post by alph4 »

thanks for all information, i will try it out. thanks again

h4rry84
Moderators
Moderators
Posts: 234
Joined: 04 Apr 2008, 09:30
Noob?: Yes
Location: My House
Contact:

Re: spamming skills messages

#5 Post by h4rry84 »

it should be another way than this :?

alph4
Noob
Noob
Posts: 3
Joined: 12 Apr 2008, 18:08

Re: spamming skills messages

#6 Post by alph4 »

h4rry84 wrote:it should be another way than this
then show us the way, it may help us. thanks :D

Motivus
Developers
Developers
Posts: 157
Joined: 04 Apr 2008, 13:33
Noob?: Yes

Re: spamming skills messages

#7 Post by Motivus »

h4rry84 wrote:it should be another way than this :?
That is the best way until proper support for the skill is added.

I posted more about this here
Oh no.

Hexo55
Noob
Noob
Posts: 8
Joined: 19 Jan 2010, 22:57
Noob?: Yes

Re: spamming skills messages

#8 Post by Hexo55 »

Sorry for bringing this thread back to life, but I'm having the same problem. Devotion related messages are being spammed in my console whenever I use devotion. I'm using the latest SVN version (r7132). Here is the code for devotion in my config:

Code: Select all

partySkill Devotion {
	lvl 1
	sp > 25
	target XXXXX
	target_isNotMyDevotee 1
	notInTown 1
}

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: spamming skills messages

#9 Post by Technology »

in last svn you can use:
squelchDomains devotion
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

Locked