User Control Panel
Advertisements

HELP US, HELP YOU!

Say Command

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands
View unanswered posts
Author Message
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Fri Apr 09, 2004 12:51 pm    Post subject: Reply with quote

Code:
# COMMAND NAME:<br />#   Say Command<br /># DESCRIPTION:<br />#   Say Your Message<br /># COMPATIBILITY:<br />#   MSN / AIM<br /><br />sub say {<br />my ($self,$client,$msg,$listener) = @_;<br />if ($listener eq "MSN") {<br />$self->sendmsg ("$msg");<br />}<br />if ($listener eq "AIM") {<br />my ($self,$client,$msg,$listener) = @_;<br />$self->send_im ("$msg");<br />}<br />}<br />1;

_________________
Heroes NBC
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Fri Apr 09, 2004 2:51 pm    Post subject: Reply with quote

Use return instead of sendmsg if you're just returning one reply.

I'm not going to actively support any commands you make that uses sendmsg instead of return to return only one reply.

And by the way, look at your signature (or reload the page if it's cached), one of your images is broken. Razz

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Fri Apr 09, 2004 5:13 pm    Post subject: Reply with quote

Code:
<br />CODE  <br /># COMMAND NAME:<br /># Say Command<br /># DESCRIPTION:<br /># Say Your Message<br /># COMPATIBILITY:<br /># MSN / AIM<br /><br />sub say {<br />my ($self,$client,$msg,$listener) = @_;<br />if ($listener eq "MSN") {<br />$return $msg;<br />}<br />if ($listener eq "AIM") {<br />my ($self,$client,$msg,$listener) = @_;<br />$return $msg;<br />}<br />}<br />1; <br />


i think i dont use $return much
Back to top
Keenie
Almost An Agent
Almost An Agent


Joined: 31 Oct 2003
Posts: 1071

Reputation: 52.4

PostPosted: Fri Apr 09, 2004 5:23 pm    Post subject: Reply with quote

Code:
sub say <br />{<br />   my ($self,$client,$msg,$listener) = @_;<br />   return $msg;<br />}<br />1;


...
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Sat Apr 10, 2004 9:21 am    Post subject: Reply with quote

QUOTE(Keenie @ Apr 9 2004, 09:23 AM)
Code:
sub say <br />{<br />   my ($self,$client,$msg,$listener) = @_;<br />   return $msg;<br />}<br />1;


...

Keenie:
I wanted to try make it for aim though,
Cer:
I didnt know both of the services supported return...
Calum:
Its Return not $return

_________________
Heroes NBC
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Sat Apr 10, 2004 5:32 pm    Post subject: Reply with quote

QUOTE(JoeX @ Apr 10 2004, 04:21 AM)
Cer:
I didnt know both of the services supported return...

return is a Perl command and has nothing to do with when or how it's used.

Commands that are service specific look like this:
$self->sendmsg (); #msn
$self->send_im (); #aim
$self->set_away (); #aim
$self->set_status (); #msn
$self->send (); #msn

etc.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands 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