User Control Panel
Advertisements

HELP US, HELP YOU!

chat

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
Drayshak
Young One
Young One


Joined: 06 Jan 2004
Posts: 93
Location: Nottinghamshire, UK
Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2
votes: 4

PostPosted: Wed Jan 21, 2004 7:27 pm    Post subject: Reply with quote

how would *lazy* get it to ask yes or no and when *lazy* answer it will take *lazy* there or not?? i dont know where the callbacks are :'( so i cant really do it properly till i can do the callback thingymbob, any help??
Back to top
WinterBot
Member
Member


Joined: 17 Jan 2004
Posts: 108

Reputation: 30.2Reputation: 30.2Reputation: 30.2

PostPosted: Wed Jan 21, 2004 7:34 pm    Post subject: Reply with quote

what? i think you might want to edit that post, or maybe im the only one that doesnt understand it? Wink
Back to top
Drayshak
Young One
Young One


Joined: 06 Jan 2004
Posts: 93
Location: Nottinghamshire, UK
Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2
votes: 4

PostPosted: Wed Jan 21, 2004 8:07 pm    Post subject: Reply with quote

right, when *lazy* type chat i want it to say do you agree to rules yes or no, and then when *lazy* type yes it takes *lazy* in and no means its shuts off the callback which is checking for the answer
Back to top
WinterBot
Member
Member


Joined: 17 Jan 2004
Posts: 108

Reputation: 30.2Reputation: 30.2Reputation: 30.2

PostPosted: Wed Jan 21, 2004 8:15 pm    Post subject: Reply with quote

oohhhh like what DC and bot2k3 do? sorry i dont know that command
Back to top
Drayshak
Young One
Young One


Joined: 06 Jan 2004
Posts: 93
Location: Nottinghamshire, UK
Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2
votes: 4

PostPosted: Wed Jan 21, 2004 8:17 pm    Post subject: Reply with quote

damn, eric, *lazy* know anything about it?? lol i know it has summat to do with callbacks like calc does
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Wed Jan 21, 2004 8:53 pm    Post subject: Reply with quote

Peice-o-cake (darwin now uses this if you wanna try it out)

Code:
<br />sub chat<br />{ <br />    my ($bot, $self, $user, $msg) = @_;<br /><br />    my $user_settings = $bot->{users}->{$user};<br />    my $msn = $bot->{msn};<br />    my $settings = $bot->{settings};<br /><br />    # command body here.<br />    if ($msg eq '')<br />    {<br />        $user_settings->{callback} = "chat";<br />        return "Type 'yes' to agree to these rules.\n\n 1.) Be Nice\n 2.) Have Fun";<br />    }            <br />    elsif ($msg eq 'yes')<br />    {   <br />        $user_settings->{callback} = "";<br />        if (!exists $bot->{chatroom} or !exists $bot->{msn}->{Socks}->{$bot->{chatroom}->{fn}} ) {<br />            $bot->{chatroom} = $self;<br />            $self->{settings}->{Silent} = 1;<br />            return "This is now the chat room. " . $bot->{chatroom}->{fn};<br />        }<br />        elsif ($self eq $bot->{chatroom})<br />        {<br />            return "Your in the chat room.";<br />        }<br />        else<br />        {<br />            $bot->{chatroom}->invite($user);<br />            return "Inviting you to the chat room now!" .  $bot->{chatroom}->{fn};<br />        }<br />    }<br />    else<br />    {<br />        $user_settings->{callback} = "";<br />        return "Sorry you can't aggree to these rules!";<br />    }<br />        <br />} <br /><br />{<br />    Category    => 'Conversations',         <br />    Description => 'start a chat room', <br />};<br />

_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Drayshak
Young One
Young One


Joined: 06 Jan 2004
Posts: 93
Location: Nottinghamshire, UK
Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2Reputation: 46.2
votes: 4

PostPosted: Wed Jan 21, 2004 8:54 pm    Post subject: Reply with quote

kewl thnx Razz Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl 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