User Control Panel
Advertisements

HELP US, HELP YOU!

Block users

 
Post new topic   Reply to topic    Bot Depot Forum Index -> AIM Protocol & questions
View unanswered posts
Author Message
Tony_shu
God Like
God Like


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Sun Feb 22, 2004 12:15 am    Post subject: Reply with quote

I thought that blocking the user through the following method would keep them from talking to the bot:
Code:
$aim->add_deny(1 , 'Buddies', $toblock);<br />$aim->send_config();<br />$aim->send_buddies();
...However, it blocks them for the time that the bot is online. When the bot logs off, and then later signs on again, the individuals can still see the bot and talk to them. The only thing is, is that it warns them when they talk to it.

If I sign onto the bot's screenname, the "blocked" users are listed in the deny list (under Preferences->Privacy).

I use Net::AIM...perhaps if I use Net::Oscar, would that make a difference.

Sorry to keep asking more questions but...
1. What are the differnces between Net::AIM and Net::Oscar
2. Where can I get Net::Oscar
3. If I use Net::Oscar, what do I need to change in my code (ie, Net::AIM uses $aim throughout the code, will that have to change)?

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Sun Feb 22, 2004 12:54 am    Post subject: Reply with quote

I think there's also a command to GET your buddy list settings from the server.

Do that when it signs on and it will load the blocked lists and stuff.

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


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Sun Feb 22, 2004 1:06 am    Post subject: Reply with quote

In the list of "commands", I found:
$aim->get($key) ... "This method simply gets the value of $key from the internal hash" ... but it doesn't really say what $key should be.

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Sun Feb 22, 2004 1:13 am    Post subject: Reply with quote

I don't know, try Net::OSCAR. You can either get version 2.0 from CPAN, or you can get version 1.0 from either of the bots I uploaded (CKS ChaosBot or CKS NexusBot).

I personally prefer version 1.0, because 2.0 messed up the chat support - chats totally don't even work at all; 2.0 made the bot stop talking after about 20 minutes with the error "Request denied"; 2.0 suddenly broke on me one day, something about a Win32 error that couldn't be fixed.

The only advantage 2.0 really has is buddy icon support and support for invisibility settings - I could get neither of them to work anyway, I kept getting the error "Your client doesn't support buddy icons" or "Your client doesn't support extended status", etc.

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


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Sun Feb 22, 2004 1:59 am    Post subject: Reply with quote

I tried to "convert" to Net::OSCAR ... but I'd have to figure out how reformat my login() sub.

Thanks for the suggestion Very Happy

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Sun Feb 22, 2004 2:57 am    Post subject: Reply with quote

Here's my Net::OSCAR part of my bot's signon thing, hope this helps:

Code:
   # AOL Instant Messenger<br />   if ($chaos->{$robot}->{listener} eq "AIM") {<br />  print "\tChaosAIM: Signing on $robot to AIM... ";<br /><br />  # Create a new Net-OSCAR for this bot.<br />  $chaos->{$robot}->{client} = Net::OSCAR->new();<br /><br />  # Setup AIM handlers.<br />  $chaos->{$robot}->{client}->set_callback_admin_error (\&aim_admin_error);<br />  $chaos->{$robot}->{client}->set_callback_admin_ok (\&aim_admin_ok);<br />  $chaos->{$robot}->{client}->set_callback_auth_challenge (\&aim_auth_challenge);<br />  $chaos->{$robot}->{client}->set_callback_buddy_in (\&aim_buddy_in);<br />  $chaos->{$robot}->{client}->set_callback_buddy_info (\&aim_buddy_info);<br />  $chaos->{$robot}->{client}->set_callback_buddy_out (\&aim_buddy_out);<br />  $chaos->{$robot}->{client}->set_callback_buddylist_error (\&aim_buddylist_error);<br />  $chaos->{$robot}->{client}->set_callback_buddylist_ok (\&aim_buddylist_ok);<br />  $chaos->{$robot}->{client}->set_callback_chat_buddy_in (\&aim_chat_buddy_in);<br />  $chaos->{$robot}->{client}->set_callback_chat_buddy_out (\&aim_chat_buddy_out);<br />  $chaos->{$robot}->{client}->set_callback_chat_closed (\&aim_chat_closed);<br />  $chaos->{$robot}->{client}->set_callback_chat_im_in (\&aim_chat_im_in);<br />  $chaos->{$robot}->{client}->set_callback_chat_invite (\&aim_chat_invite);<br />  $chaos->{$robot}->{client}->set_callback_chat_joined (\&aim_chat_joined);<br />  $chaos->{$robot}->{client}->set_callback_error (\&aim_error);<br />  $chaos->{$robot}->{client}->set_callback_evil (\&aim_evil);<br />  $chaos->{$robot}->{client}->set_callback_im_in (\&aim_im_in);<br />  $chaos->{$robot}->{client}->set_callback_im_ok (\&aim_im_ok);<br />  $chaos->{$robot}->{client}->set_callback_rate_alert (\&aim_rate_alert);<br />  $chaos->{$robot}->{client}->set_callback_signon_done (\&aim_signon_done);<br /><br />  # Sign on the robot.<br />  $screenname = $robot;<br />  $password = $chaos->{$robot}->{pw};<br /><br />  $chaos->{$robot}->{client}->signon ($screenname,$password) or panic ("Could not sign on!", 0);<br /><br />  print "Connection recieved!\n\n";<br />   }


Edit
Also, the $chaos->{$robot}->{client} would be the equivalent to just $aim. Razz

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