User Control Panel
Advertisements

HELP US, HELP YOU!

Add Contact command?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Wed Apr 14, 2004 9:19 pm    Post subject: Reply with quote

I need a add contact command. For Elsif. So when I want to add someone to the bot all I got to do is type #add . And If I want to delete someone on the bots account all I got to do is type #delete and it deletes them.

Can Anyone Help Me Out??

Thanks B)
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

Reputation: 44.1Reputation: 44.1Reputation: 44.1Reputation: 44.1

PostPosted: Wed Apr 14, 2004 9:37 pm    Post subject: Reply with quote

I was checking out the msn.pm some other days and I think it is.

Code:
Adding:<br />$self->addcontact('$msg');<br /><br />removing:<br /><br />$self->remcontact('$msg');


so for andromeda it would be.
Code:
sub add<br />{<br />    my ($bot, $self, $user, $msg) = @_;<br /><br />$self->addcontact('$msg');<br /><br />return"$msg has been added";<br /><br />}<br /><br />{<br /><br />};


Code:
sub remove<br />{<br />    my ($bot, $self, $user, $msg) = @_;<br /><br />$self->remcontact('$msg');<br /><br />return"$msg has been removed";<br /><br />}<br /><br />{<br /><br />};

I think. Razz
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Wed Apr 14, 2004 9:47 pm    Post subject: Reply with quote

It doesnt work... It kicks my bot offline!
Back to top
Myzterio
Not Yet a God
Not Yet a God


Joined: 13 Dec 2003
Posts: 429

Reputation: 38.1Reputation: 38.1Reputation: 38.1Reputation: 38.1

PostPosted: Wed Apr 14, 2004 10:03 pm    Post subject: Reply with quote

what kinda template are you using o.O
Back to top
Myzterio
Not Yet a God
Not Yet a God


Joined: 13 Dec 2003
Posts: 429

Reputation: 38.1Reputation: 38.1Reputation: 38.1Reputation: 38.1

PostPosted: Wed Apr 14, 2004 10:08 pm    Post subject: Reply with quote

#add Command :

Code:
elsif ($msg=~/^\#add (.*)$/)<br />{<br />$self->sendmsg("$1 has been added");<br />$msn->add_contact($1);<br />}


#delete Command :

Code:
elsif ($msg=~/^\#delete (.*)$/)<br />{<br />$self->sendmsg("$1 has been deleted");<br />$msn->rem_contact($1);<br />}
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Wed Apr 14, 2004 10:16 pm    Post subject: Reply with quote

ERROR:

Quote:
Can't Locate object method "add_contact" via "MSN" at C:\Bot Files\Bot Template\BotWorking.pl line 320, line 5.


Line 320 is.

Quote:
$self->sendmsg("$1 has been added");
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Wed Apr 14, 2004 11:12 pm    Post subject: Reply with quote

What version of MSN.pm are you using? The add and rem contact methods have undergone some changes recently. You might have an old version.
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Wed Apr 14, 2004 11:44 pm    Post subject: Reply with quote

I'm using the latest off this site.
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

Reputation: 44.1Reputation: 44.1Reputation: 44.1Reputation: 44.1

PostPosted: Thu Apr 15, 2004 1:30 am    Post subject: Reply with quote

Try using 'addcontact', and 'remcontact', instead of 'add_contact', 'rem_contact'.

Code:
elsif ($msg=~/^\#add (.*)$/)<br />{<br />$self->sendmsg("$1 has been added");<br />$msn->addcontact($1);<br />}


Code:
elsif ($msg=~/^\#rem (.*)$/)<br />{<br />$self->sendmsg("$1 has been added");<br />$msn->remcontact($1);<br />}
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Thu Apr 15, 2004 2:33 am    Post subject: Reply with quote

When telling us what version its much better to copy the version number that prints out when you ruin your bot. Since at any time a new MSN.pm could come out at any time and then your "latest" means nothing.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Thu Apr 15, 2004 2:59 am    Post subject: Reply with quote

Eric, the version is MSN 1.3.10 BETA
Back to top
roadie
Newbie
Newbie


Joined: 12 Feb 2004
Posts: 48

Reputation: 28.1Reputation: 28.1Reputation: 28.1

PostPosted: Thu Apr 15, 2004 4:05 am    Post subject: Reply with quote

i want this command for morphious template Razz im on the newest version of msn.pm hope that all helps Very Happy
Back to top
opdude
Young One
Young One


Joined: 18 Feb 2004
Posts: 87

Reputation: 28.7Reputation: 28.7Reputation: 28.7

PostPosted: Thu Apr 15, 2004 12:10 pm    Post subject: Reply with quote

ok erm i had this problem before so i did a little editing to msn.pm

all i did basicaly was to change the list it adds to. So from FL to AL and it works i think its in the MSN.PM 1.3.12 BETA that Matt007 did

Code:
sub addcontact<br />{<br />    my $self = shift || croak(strMethodOnly);<br />    my $email = shift || carp("Need an email address to add") && return;<br /><br />    #print( "**** adding contact $email to AL list\n" );<br /><br />    return $self->_add_to_list('AL', $email);<br /><br />    my $client = $self->GetMaster();<br />    $client->{Lists}->{'AL'}->{$email} = 1;<br />    my $GUID = $client->{Groups}->{'Friends'};<br />    $client->send( "ADC", "AL N=$email F=$email $self->{'Groups'}->{'Friends'}" ) if $self->isVer('MSNP10');<br />    $client->send( "ADD", "AL $email $email 1") if $self->isVer('MSNP9');<br /><br />    return 1;<br />}
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Thu Apr 15, 2004 3:27 pm    Post subject: Reply with quote

QUOTE(opdude @ Apr 15 2004, 04:10 AM)
all i did basicaly was to change the list it adds to. So from FL to AL and it works i think

The problem with that is that the AL and FL lists are two different things. AL is a list of emails you are allowing to contact you and FL is for emails that you want on your buddy list..

addcontact and remcontact are for maintaining your contact (buddy) list, not your allow list, so changing AL to FL would be very wrong.
Back to top
Zappy
Newbie
Newbie


Joined: 18 Apr 2004
Posts: 5

Reputation: 25.1Reputation: 25.1Reputation: 25.1

PostPosted: Wed Apr 21, 2004 3:46 pm    Post subject: Reply with quote

QUOTE(Mojave @ Apr 15 2004, 07:27 AM)
QUOTE(opdude @ Apr 15 2004, 04:10 AM)
all i did basicaly was to change the list it adds to. So from FL to AL and it works i think

The problem with that is that the AL and FL lists are two different things. AL is a list of emails you are allowing to contact you and FL is for emails that you want on your buddy list..

addcontact and remcontact are for maintaining your contact (buddy) list, not your allow list, so changing AL to FL would be very wrong.

What the hell*lazy*talkin bout?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



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