User Control Panel
Advertisements

HELP US, HELP YOU!

Random Invite Admins

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
GrimReaper
Young One
Young One


Joined: 26 Mar 2004
Posts: 86

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Mon Apr 12, 2004 9:37 pm    Post subject: Reply with quote

First, before you lower my rep and reply with "GO LOOK IN THE STUPID FORUMS!", i already KNOW that over here is already a topic on that. BUT the code dosen't work for me... it dosen't invite, not for me anyways, so.. can anyone help? Surprised :unsure:
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Mon Apr 12, 2004 11:30 pm    Post subject: Reply with quote

If you're using the new MSN beta, it might be because of that. There's like an infinite number of things that could/have gone wrong with it.

So make sure you're using an older version. Smile

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
xxbssportz207xx
Young One
Young One


Joined: 02 Apr 2004
Posts: 91

Reputation: 27.8Reputation: 27.8Reputation: 27.8

PostPosted: Mon Apr 12, 2004 11:35 pm    Post subject: Reply with quote

Where can i download the new msn beta Surprised
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Mon Apr 12, 2004 11:55 pm    Post subject: Reply with quote

I think it's in the Downloads/Protocols. It doesn't work on some OS's, and some bugs I found personally are:

• $self->call() doesn't work for me, it kills the socket
• It doesn't automatically delete sockets when everyone in them leaves. So if you're using that !chat command, and everyone leaves the chat, your bot will keep trying to invite people to a closed socket and not get anywhere, so chat is basicly dead until restarting.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
GrimReaper
Young One
Young One


Joined: 26 Mar 2004
Posts: 86

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Tue Apr 13, 2004 1:29 am    Post subject: Reply with quote

well, im not using the beta...
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Tue Apr 13, 2004 4:09 pm    Post subject: Reply with quote

You don't want to accidentaly show us the code you are trying to use? Maybe tell us the bot you are using? Little things that would allow us to save our mind reading abilities for saveing people in burning buildings?
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Tue Apr 13, 2004 4:17 pm    Post subject: Reply with quote

QUOTE(Cer @ Apr 12 2004, 03:55 PM)
• $self->call() doesn't work for me, it kills the socket

You shouldn't be calling call() on a socket but on the msn object.

Code:
$msn->call();


Why would you call it on $self?

Still, calling it on $self shouldn't kill the socket, it should just fail nicely. We'll have to look into that.
Back to top
jonphamta
Senior Member
Senior Member


Joined: 20 Jan 2004
Posts: 247

Reputation: 32.9Reputation: 32.9Reputation: 32.9

PostPosted: Wed Apr 14, 2004 12:54 am    Post subject: Reply with quote

QUOTE(xxbssportz207xx @ Apr 12 2004, 03:35 PM)
Where can i download the new msn beta  Surprised

we're talking about MSN.PM Beta
not MSN 6.2 Beta
Back to top
GrimReaper
Young One
Young One


Joined: 26 Mar 2004
Posts: 86

Reputation: 27.5Reputation: 27.5Reputation: 27.5

PostPosted: Wed Apr 14, 2004 1:23 am    Post subject: Reply with quote

QUOTE(eric256 @ Apr 13 2004, 08:09 AM)
You don't want to accidentaly show us the code you are trying to use? Maybe tell us the bot you are using? Little things that would allow us to save our mind reading abilities for saveing people in burning buildings?

here's the code i tried:

Code:
sub getadmin<br />{ <br />my ($bot, $self, $user, $msg) = @_;<br /><br />open (FILE, "admins.txt");<br /><br />my @lines = <FILE>; <br /><br />close (FILE); <br /><br />chomp (@lines); <br /><br />my $admins = $lines[int(rand(scalar(@lines)))];<br /><br />return "Inviting the admin, $admins";<br /><br />$self->invite("$admins");<br />}<br />{<br />   Category    => '(co)System(co)'<br />   Description => 'Get An Online Admin To Enter Your Convo' <br />};


Everything works fine, except that it dosen't invite the admin.. and yes, i DID make an admin.txt file. Anyone know whats the problem? Sad
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Wed Apr 14, 2004 5:20 am    Post subject: Reply with quote

Try printing out $admins to see if it realy holds the value you expect it to.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Wed Apr 14, 2004 5:23 am    Post subject: Reply with quote

just an idea but you could try


Code:
<br />  sub getadmin { <br />     my ($bot, $self, $user, $msg) = @_;<br /><br />open (FILE, "./admins.txt");<br />  my @lines = <FILE>; <br />    close (FILE); <br />       chomp (@lines); <br />  <br />my $admins = $lines[int(rand(scalar(@lines)))];<br />   $self->invite("$admins");<br />     return "Inviting the admin, $admins";<br /><br /><br />}<br />{<br />  Category    => '(co)System(co)'<br />  Description => 'Get An Online Admin To Enter Your Convo' <br />};
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Wed Apr 14, 2004 5:31 am    Post subject: Reply with quote

No Calum you can't because as soon as it gets to "return" the interpreter leaves that sub and doesn't look at the lines following it.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Wed Apr 14, 2004 5:41 am    Post subject: Reply with quote

ok i dont use andromeda though it confuses me

i may use it some time and get used to it so i can convert the commands

theres some real nice ones in andromeda
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Wed Apr 14, 2004 2:18 pm    Post subject: Reply with quote

Andromeda has nothing to do with the return. Return is a perl command that tells it not to look any farther just return this value to wherever called this sub.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Wed Apr 14, 2004 2:48 pm    Post subject: Reply with quote

Yeah.... return is useful for admin only commands (the 'old school way')

Code:
# Instead of...<br />if (isAdmin($user)) {<br />  # do this<br />}<br />else {<br />  return "Not admin";<br />}<br /><br /># You can just do...<br />if (isNotAdmin($user)) {<br />  return "Not admin";<br />}<br /><br /># do admin only command here

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