User Control Panel
Advertisements

HELP US, HELP YOU!

Ignore rings to chats?

 
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol
View unanswered posts
Author Message
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Sun Jan 30, 2005 11:17 pm    Post subject: Reply with quote

Some moron that a lot of you unfortunately know, gordy12gg/gordy13gg/garry12gg/garry13gg, spends 100% of his online time inviting bots together, and each time a "smart" bot leaves the convo because the other members are blocked, he invites them back in.

AIM and Jabber don't have this problem, because they are one-on-one conversations. On MSN, somebody can invite you to a big chat room, and you don't even have much choice in the matter (at least on AIM, you have to accept invites to chats <_< ).

So I was wondering how you would just plain not answer a RNG. I'd rather have the bot be like "Somebody's inviting me into a multiuser room, I won't join the room" than have the bot be like "Okay, I joined the room - wow there's a lot of people here, I'm leaving"... know what I mean?

So how can you deny a RNG? (I know there's something with the Ring handler but I don't know exactly how to do it).

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

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

PostPosted: Sun Jan 30, 2005 11:56 pm    Post subject: Reply with quote

You can't really deny the RNG, you just make your bot leave..
anyways, if you bot gets joined in a socket, it would be called IRO, so in msn.pm if you set that into a sub. (such as sub welcome) do:
Code:
sub welcome {<br />my $x = 0;<br />foreach (keys (%{$msn->socketstuffforeachuserinthesock})) { <br />$x++ foreach (keys %{$msn->socketstuffbuddyblah});<br />}<br />if ($x > 4) {<br /># Leave .  .  .<br />$msn->leave();<br />} else {<br />#sendWellcoming message<br />}<br />}


Oh, and do something like that when your botty get JOI.
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Mon Jan 31, 2005 12:14 am    Post subject: Reply with quote

QUOTE(..::BIGmouth( )::.. @ Jan 30 2005, 06:56 PM)
You can't really deny the RNG, you just make your bot leave..
anyways, if you bot gets joined in a socket, it would be called IRO, so in msn.pm if you set that into a sub. (such as sub welcome) do:
Code:
sub welcome {<br />my $x = 0;<br />foreach (keys (%{$msn->socketstuffforeachuserinthesock})) { <br />$x++ foreach (keys %{$msn->socketstuffbuddyblah});<br />}<br />}<br />if ($x > 4) {<br /># Leave .  .  .<br /> $msn->leave();<br />} else {<br />#sendWellcoming message<br />}<br />}


Oh, and do something like that when your botty get JOI.

Yeah. Or a shorter way of doing that:

Code:
sub welcome {<br />   my $self = shift;<br />   my $buds = $self->getMembers;<br />   my @users = keys %{$buds};<br />   if (scalar(@users) > 4) {<br />      $self->leave;<br />   }<br />}


I got it worked out with the Answer and Join handlers. I was just poking around to see if the Ring handler could determine anything about the socket being created... but it can't. Sad It'd be nice to invite the bot and never see the bot join the conversation though. Very Happy

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Mon Jan 31, 2005 12:15 am    Post subject: Reply with quote

Yes you can deny a RNG, but returning 0 from the Ring handler.
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

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

PostPosted: Mon Jan 31, 2005 12:25 am    Post subject: Reply with quote

After thinking for about 2 mins, I thought of how to do it. (Thanks to aurora's RNG example) Razz
Anyhow, It would be something like this..

Code:
if ($CMD eq 'RNG') {<br /><br />return print "Denied user (" . $sP[5] . ")" if ($sP[5] eq 'Email@adress.com');<br />#Socket template<br /><br />}


In MSN.PM:

Code:
sub CMD_RNG<br />{<br />        my $self = shift;<br />        my ($sid, $addr, undef, $key, $user, $friendly) = @_;<br />        return print "Denied ($user)" if ($user eq 'email@adress.com');<br /><br />        # ask for approval before we answer this ring (default to approved)<br />        my $do_accept = $self->{Msn}->call_event( $self, "Ring", $user, uri_unescape($friendly) );<br /><br />        if( !defined $do_accept || $do_accept )<br />        {<br />                my ($host, $port) = split ( /:/, $addr );<br /><br />                my $switchboard = new MSN::SwitchBoard( $self->{Msn}, $host, $port );<br />                $switchboard->connectRNG( $key, $sid );<br />        }<br />}


The problem: It only recieves the caller, so the user can just use a diff bot to invite your bot.
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Mon Jan 31, 2005 1:31 am    Post subject: Reply with quote

What do you mean "thanks to aurora's RNG example"? The second snippet of code you quoted is from MSN 2.0, how about thanking it? Razz
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

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

PostPosted: Mon Jan 31, 2005 3:03 am    Post subject: Reply with quote

Well, umm it was just an example of how to do it. Razz
Anyhow, Yep good job on it. *thanks it for my minute's of pleasure*
Back to top
Art
God Like
God Like


Joined: 25 May 2004
Posts: 551
Location: Amsterdam, Holland
Reputation: 35.2Reputation: 35.2Reputation: 35.2Reputation: 35.2

PostPosted: Mon Jan 31, 2005 8:41 am    Post subject: Reply with quote

There are so many features in the MSN Protocol which allmost no client uses. It would be great to see a window popup or something like that everytime someone invites you, asking if you want to accept, in the PIMP Messenger.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol 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