User Control Panel
Advertisements

HELP US, HELP YOU!

mirrors and msn instances

 
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol modules
View unanswered posts
Author Message
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Mon Jul 25, 2005 12:13 pm    Post subject: mirrors and msn instances Reply with quote

I've been setting up mirrors such that i have a $mirrors hasref with 3 mirrors sotred n it, eg $mirrors->{'bot@draget.net'}, I need the handlers to pass the partcular MSN for logging etc, how can I do this?
thanks!
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: Mon Jul 25, 2005 3:48 pm    Post subject: Reply with quote

Code:
foreach my $mirrors (@mirrors){
my $msn->{$mirrors} = new MSN($mirrors);
}
*guesses*

Mojave has made a mirror module - could use that, I think it's on http://botwork.com.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Mon Jul 25, 2005 5:04 pm    Post subject: Reply with quote

Ian, that would work for an array, but not a hashref:

Code:
$number = 0;
foreach (keys %{$mirrors})
{
$msn->{$number++} = new MSN(Handle => $_, Password => 'pass');
}


The new MSN is of course incorrect, but you get the idea. $_ is the variable for the username.

As a side note, I am currently testing my new Bot template, which connects mirrors to both AIM and MSN. If you are interested in using it prior to release, just ask me [PM, MSN, email, etc]. This offer is not open to others, so don't get ideas, anyone else.

_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Rob150
Newbie
Newbie


Joined: 27 Jun 2005
Posts: 26
Location: Machester, England
Reputation: 11

PostPosted: Mon Jul 25, 2005 5:25 pm    Post subject: Reply with quote

I wonder how long it took you all to learn perl as incredible as this. sorry for off-topic post
_________________
Rob150.

Bot-Depot lives again!!!
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: Mon Jul 25, 2005 5:51 pm    Post subject: Reply with quote

You can never stop learning Perl. (Unless your Larry Wall).

It took me about a year to learn Perl.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Mon Jul 25, 2005 6:03 pm    Post subject: Reply with quote

I started on the 23rd April, 2004. Work it out RazzRazz
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Rob150
Newbie
Newbie


Joined: 27 Jun 2005
Posts: 26
Location: Machester, England
Reputation: 11

PostPosted: Mon Jul 25, 2005 6:26 pm    Post subject: Reply with quote

1 year 2 months! I'm interested in learning, but I have no idea where to start Crying or Very sad
_________________
Rob150.

Bot-Depot lives again!!!
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: Mon Jul 25, 2005 7:07 pm    Post subject: Reply with quote

The best place to start to learn something is Google or a book (Perl Cookbook ($77 Canadian)). Also, Perl Doc would be a good place to start.
Back to top
Cheater
Senior Member
Senior Member


Joined: 10 Jun 2005
Posts: 236

Reputation: 15.8Reputation: 15.8

PostPosted: Mon Jul 25, 2005 8:22 pm    Post subject: Reply with quote

Some other Perl references:

Robert's Perl Tutorial **REALLY GOOD**
Perl Monks
Back to top
Rob150
Newbie
Newbie


Joined: 27 Jun 2005
Posts: 26
Location: Machester, England
Reputation: 11

PostPosted: Mon Jul 25, 2005 8:57 pm    Post subject: Reply with quote

Thankyou very much but I really don't have so much time to learn, I have a basic school day 7am til 4.30pm...is there a crash course?
Also I bought a book when i wanted to learn HTML, and that didn't help whatsoever, because i already knew HTML Rolling Eyes

_________________
Rob150.

Bot-Depot lives again!!!
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jul 26, 2005 8:46 am    Post subject: Reply with quote

ah, thats not what i meant, i have it set up using the foreach exactaly as demonstrated, but I need the handler called subs to "know" which mirror is being delt with, ie that status sub has access to knowing what its handle is.


thanks!
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Tue Jul 26, 2005 8:48 am    Post subject: Reply with quote

Well, in my example:

$msn->{1}->sendMessage, etc. You'd just set $msn->{1}->{handle} to your bot's email, so it can find itself.

_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Tue Jul 26, 2005 11:00 pm    Post subject: Reply with quote

There's another way to get the bot's own handle and/or MSN reference.

When you have a switchboard or notification object ($self), just use:
$self->{Msn}
as your $msn object.....
$self->{Msn}->call ('soandso@hotmail.com','Hello!');

And to get your handle......
$self->{Msn}->{Handle} if you have $self, or
$msn->{Handle} if you have $msn.

Either way works fine. Smile

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


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Thu Jul 28, 2005 4:24 am    Post subject: Reply with quote

Thanks Cer!

that will fit perfectly into my existing code!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol modules 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