|
| Author |
Message |
Flava Newbie

Joined: 24 Jan 2004 Posts: 35
   
|
Posted: Sun Jan 25, 2004 8:41 pm Post subject: |
|
|
Hiya, just wanted to ask a simple little thing. I am using the andromeda Broadcasting system and want all broadcasts to turn out red so that they stand out. The one thing im useless with in perl is changing fonts and colours! Please can you help. The coding to the broadcasting is:
| Code: | | sub broadcast<br />{ <br /> my ($bot, $self, $user, $msg) = @_;<br /><br /> my $user_settings = $bot->{users}->{$user};<br /> my $msn = $bot->{msn};<br /> my $settings = $bot->{settings};<br /><br /> # command body here.<br /> my $i = 0;<br /> foreach my $id (keys %{$bot->{msn}->{Socks}})<br /> {<br /> next unless defined $bot->{msn}->{Socks}->{$id} and $bot->{msn}->{Socks}->{$id}->{Type} eq <br /><br />'SB';<br /> $bot->{msn}->{Socks}->{$id}->sendmsg("$msg");<br /> $i++;<br /> }<br /> return "$i messages sent out.";<br />} <br /><br />{<br /> Category => 'Conversations',<br /> Description => 'Broadcast a message to all open conversations!',<br />}; |
I need this bit to be coloured in red:
| Code: | | $bot->{msn}->{Socks}->{$id}->sendmsg("$msg"); |
Hope you can help, thanks  |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Sun Jan 25, 2004 9:49 pm Post subject: |
|
|
| Code: | | $bot->{msn}->{Socks}->{$id}->sendmsg($msg, Color => 'FF'); |
should work how you want it to |
|
| Back to top |
|
 |
Flava Newbie

Joined: 24 Jan 2004 Posts: 35
   
|
Posted: Mon Jan 26, 2004 6:44 am Post subject: |
|
|
Weird :S I entered that code then the command wouldnt even work :/ Maybe its the wrong part.. |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Mon Jan 26, 2004 7:53 am Post subject: |
|
|
try puttin the $msg, Color => 'FF' in quotes "$msg, Color => 'FF'" just a guess from experience |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Mon Jan 26, 2004 4:32 pm Post subject: |
|
|
do NOT put those in qoutes. That will send the message with , Color => 'FF' at the end. Instead check to make sure you didn't miss copy some of the code. The way keenie said was exactly correct so check to make nothing else got changed by accident. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Flava Newbie

Joined: 24 Jan 2004 Posts: 35
   
|
Posted: Mon Jan 26, 2004 6:14 pm Post subject: |
|
|
| Oh *lazy* Its working now - thanks all |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Mon Jan 26, 2004 6:18 pm Post subject: |
|
|
| sorry for my information, *lazy* i get it now |
|
| Back to top |
|
 |
|