|
| Author |
Message |
Destroyer_XO Newbie

Joined: 01 Jan 2004 Posts: 43
   
|
Posted: Sat Jan 03, 2004 4:42 am Post subject: |
|
|
*lazy* been looking around but where ever i go i cant find the right command
i have a perl msn bot
please help :wacko: |
|
| Back to top |
|
 |
jordanovjarra Member

Joined: 07 Nov 2003 Posts: 140
   
|
Posted: Sat Jan 03, 2004 4:45 am Post subject: |
|
|
| Code: | | $msn->set_name("name here"); |
hey thats the cmd to change your name and tbh you should easily be able to edit this to change name. |
|
| Back to top |
|
 |
Destroyer_XO Newbie

Joined: 01 Jan 2004 Posts: 43
   
|
Posted: Sat Jan 03, 2004 4:48 am Post subject: |
|
|
| *lazy* tried that i just get an error |
|
| Back to top |
|
 |
jordanovjarra Member

Joined: 07 Nov 2003 Posts: 140
   
|
Posted: Sat Jan 03, 2004 5:01 am Post subject: |
|
|
| have *lazy* set $msn or are you using something different eg $client and what template are you using? |
|
| Back to top |
|
 |
Destroyer_XO Newbie

Joined: 01 Jan 2004 Posts: 43
   
|
Posted: Sat Jan 03, 2004 5:04 am Post subject: |
|
|
im useing web bots templete if it helps this is the error i get
| Quote: | Can't call method "set_name" on an undefined value at commands/nickmsg.pl line 6 , line 5.
|
|
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Sat Jan 03, 2004 7:28 am Post subject: |
|
|
go into bot.pl and find where it says
my $msn = new MSN (Handle => ......) and take the 'my' off
and please dont post in this forum for help, its for sharing commands |
|
| Back to top |
|
 |
Destroyer_XO Newbie

Joined: 01 Jan 2004 Posts: 43
   
|
Posted: Sat Jan 03, 2004 7:39 am Post subject: |
|
|
well while its here it worked but now i have an error in the commands.pl on lin 33
it says undefined subroutine &main::nickmsg called at extras/command.pl line 33, line 11. |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Sat Jan 03, 2004 7:41 am Post subject: |
|
|
| did you name the file nickmsg.pl? if so you could always post your code and we can take a look and see whats wrong |
|
| Back to top |
|
 |
Kankionojoku Newbie

Joined: 13 Dec 2003 Posts: 14
   
|
Posted: Wed Jan 14, 2004 1:50 pm Post subject: |
|
|
Heyas... when I do the setname function it comes up !setname n the name what i typed in... how would i get !setname off from the name?
Here is my code:
| Code: | | if ($msg =~ /(^\!setname)/i) {<br /> $msn->set_name("$msg");<br />return;<br />} |
Hope you can help. |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Wed Jan 14, 2004 5:52 pm Post subject: |
|
|
| Code: | | if ($msg =~ /(^\!setname)/i) <br />{<br /> $msg =~ s/^!setname //i;<br /> $msn->set_name($msg);<br />return;<br />} |
should do it |
|
| Back to top |
|
 |
dan0211 Not Yet a God

Joined: 23 Dec 2003 Posts: 395
    
|
Posted: Wed Jan 14, 2004 5:54 pm Post subject: |
|
|
| Code: | | <br />if ($msg =~ /(^\!setname (.*)$/)/i) {<br />$msn->set_name("$1");<br />return;<br />}<br /> |
|
|
| Back to top |
|
 |
Stephen Senior Member

Joined: 03 Dec 2003 Posts: 159
   
|
Posted: Wed Jan 14, 2004 7:43 pm Post subject: |
|
|
Dan thats wrong 
| Code: | | if ($msg =~ /(^\!setname (.*)$/i) {<br />$msn->set_name("$1");<br />return;<br />} |
or this should do it  |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Wed Jan 14, 2004 8:02 pm Post subject: |
|
|
Stephen you missed it too. LOL
| Code: | | if ($msg =~ /^\!setname (.*)$/i) {<br />$msn->set_name("$1");<br />return;<br />}<br /> |
Very close though. You can also change 'return;' to 'return "message here";' _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Wed Jan 14, 2004 8:17 pm Post subject: |
|
|
and even eric included the quotes around the $1  |
|
| Back to top |
|
 |
|