|
| Author |
Message |
ScorpZ Newbie

Joined: 19 Feb 2004 Posts: 13
   
|
Posted: Fri Feb 20, 2004 8:11 am Post subject: |
|
|
*lazy* i need a shout command code please include where to put certain parts of it Thanks |
|
| Back to top |
|
 |
mat007 Almost An Agent

Joined: 12 Jan 2004 Posts: 1375
   votes: 2
|
Posted: Fri Feb 20, 2004 1:35 pm Post subject: |
|
|
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

Joined: 19 Jan 2004 Posts: 28
   
|
Posted: Sat Mar 06, 2004 1:57 pm Post subject: |
|
|
| 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 Ty |
|
| Back to top |
|
 |
dan0211 Not Yet a God

Joined: 23 Dec 2003 Posts: 395
    
|
Posted: Sat Mar 06, 2004 2:08 pm Post subject: |
|
|
| It might be because the Owner is also an Smod? |
|
| Back to top |
|
 |
paulwinter40 Newbie

Joined: 19 Jan 2004 Posts: 28
   
|
Posted: Sat Mar 06, 2004 2:16 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
/\/eo Newbie

Joined: 13 May 2004 Posts: 33
  
|
Posted: Fri Jun 18, 2004 10:09 pm Post subject: |
|
|
| Maybe you have it in two folders eg. Owner and Mod |
|
| Back to top |
|
 |
dvondrake Not Yet a God

Joined: 11 Mar 2004 Posts: 314 Location: El Paso, Texas
   
|
Posted: Sat Jun 19, 2004 12:35 pm Post subject: |
|
|
| 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

Joined: 18 Apr 2004 Posts: 2557 Location: London, England
     votes: 7
|
Posted: Sat Jun 19, 2004 12:43 pm Post subject: |
|
|
It might just be because you are in 2 sockets. _________________ ~ Josh
[ Need bot hosting on a dedicated server? PM me. ] |
|
| Back to top |
|
 |
|