User Control Panel
Advertisements

HELP US, HELP YOU!

Need a "Shout" command

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
ScorpZ
Newbie
Newbie


Joined: 19 Feb 2004
Posts: 13

Reputation: 27.2Reputation: 27.2Reputation: 27.2

PostPosted: Fri Feb 20, 2004 8:11 am    Post subject: Reply with quote

*lazy* i need a shout command code please include where to put certain parts of it
Thanks
Back to top
mat007
Almost An Agent
Almost An Agent


Joined: 12 Jan 2004
Posts: 1375

Reputation: 15.8Reputation: 15.8
votes: 2

PostPosted: Fri Feb 20, 2004 1:35 pm    Post subject: Reply with quote

I would put this topic "Begging for commands" As it should'nt be here.

And look in commands i posted a conversion!
Back to top
paulwinter40
Newbie
Newbie


Joined: 19 Jan 2004
Posts: 28

Reputation: 28.5Reputation: 28.5Reputation: 28.5

PostPosted: Sat Mar 06, 2004 1:57 pm    Post subject: Reply with quote

Code:
<br />if ($msg =~ /^shout (.*)$/) {<br />    foreach my $id (keys %{$msn->{Socks}})<br />    {<br />            next unless defined $msn->{Socks}->{$id} and $msn->{Socks}->{$id}->{Type} eq 'SB';<br />            $msn->{Socks}->{$id}->sendmsg(" $1 by Owner",Font => "$font",Color => "$colour",Effect => 'B')if ($username eq $owner);<br />            $msn->{Socks}->{$id}->sendmsg(" $1 by Admin",Font => "$font",Color => "$colour",Effect => 'B')if (isAdmins($username));<br />            $msn->{Socks}->{$id}->sendmsg(" $1 by Super Moderator",Font => "$font",Color => "$colour",Effect => 'B')if (isSmods($username));<br />            $msn->{Socks}->{$id}->sendmsg(" $1 by Moderator",Font => "$font",Color => "$colour",Effect => 'B')if (isMods($username));<br />    }<br />}<br />



That is The Code, However It seems to shout the message twice. If Anyone Can See Why I Wudnt Mind Help Smile Ty
Back to top
dan0211
Not Yet a God
Not Yet a God


Joined: 23 Dec 2003
Posts: 395

Reputation: 37.8Reputation: 37.8Reputation: 37.8Reputation: 37.8

PostPosted: Sat Mar 06, 2004 2:08 pm    Post subject: Reply with quote

It might be because the Owner is also an Smod?
Back to top
paulwinter40
Newbie
Newbie


Joined: 19 Jan 2004
Posts: 28

Reputation: 28.5Reputation: 28.5Reputation: 28.5

PostPosted: Sat Mar 06, 2004 2:16 pm    Post subject: Reply with quote

No thats not it really, when i do !shout, the following happens:


!shout hey

Bot replys..

[Psychotic Bot][ Type !menu Now ][15 Users][ says:
hey by Owner


[Psychotic Bot][ Type !menu Now ][15 Users][ says:
hey by Owner



Forrget the users number, only recently come online Razz
Back to top
/\/eo
Newbie
Newbie


Joined: 13 May 2004
Posts: 33

Reputation: 24.8Reputation: 24.8

PostPosted: Fri Jun 18, 2004 10:09 pm    Post subject: Reply with quote

Maybe you have it in two folders eg. Owner and Mod
Back to top
dvondrake
Not Yet a God
Not Yet a God


Joined: 11 Mar 2004
Posts: 314
Location: El Paso, Texas
Reputation: 32.6Reputation: 32.6Reputation: 32.6

PostPosted: Sat Jun 19, 2004 12:35 pm    Post subject: Reply with quote

Code:
<br />if($msg =~ /^shout (.*)/i){<br /><br />foreach my $id (keys %{$msn->{Socks}})<br />{    <br /> next unless defined $msn->{Socks}->{$id}<br />        and $msn->{Socks}->{$id}->{Type} eq 'SB';<br /> $msn->{Socks}->{$id}->sendmsg("(I)Announcement: $1");<br />}<br />}<br />


Here's an easier one with less coding.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Sat Jun 19, 2004 12:43 pm    Post subject: Reply with quote

It might just be because you are in 2 sockets.
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group