User Control Panel
Advertisements

HELP US, HELP YOU!

help with chat room plz
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol
View unanswered posts
Author Message
VIPER
Young One
Young One


Joined: 22 Nov 2003
Posts: 50

Reputation: 30.9Reputation: 30.9Reputation: 30.9

PostPosted: Sun Dec 28, 2003 4:07 pm    Post subject: Reply with quote

ok well
with my bot
i want a chat room
and i used this code:

Code:
elsif($msg =~ /^\!chat/)<br />   {<br />    if (!defined $chat) { <br />    $chat = $self;<br />    $chat->sendmsg("The chatroom is empty, this conversation is now the chatroom!",Font => "Tahoma",Color => '663300',Effect => "B");<br />    $chatters++;<br />    $self->sendmsg("Chat: $username has started chat. $chatters in room\n");<br />    open (DATA, ">>logs/chat.txt");<br />    print DATA "Room created by $username - " . localtime() . "\n\n";<br />    close(DATA);<br />    } else {<br />    $self->sendmsg("Please wait. You are being invited to the chatroom", "$username",Font => "Tahoma",Color => '999900',Effect => "B");<br />    $chat->send("CAL", "$victim"); <br />           }


and i typed !chat
i get this:
Morpheus - http://Morpheus.Exero.Net says:
The chatroom is empty, this conversation is now the chatroom!
Morpheus - http://Morpheus.Exero.Net says:
Chat: webmaster@exero.net has started chat. 1 in room

and when i get somone to type !chat
they get this:
Morpheus - http://Morpheus.Exero.Net says:
Please wait. You are being invited to the chatroom


and nothing happens...

they dont get invited in

can somone help me??

thanks
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Sun Dec 28, 2003 4:48 pm    Post subject: Reply with quote

I would recommend using $chat->invite($victim). Since that wont break when you change protocols, and it actualy works Smile

I'm not sure if that is your specific program but its definitly possible.

Also make sure that $victim is actualy holding there email address. Since in the two entries above it you use $username, i'm betting that $victim is not the right variable.

Let use know if you get it working.

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


Joined: 22 Nov 2003
Posts: 50

Reputation: 30.9Reputation: 30.9Reputation: 30.9

PostPosted: Sun Dec 28, 2003 10:21 pm    Post subject: Reply with quote

yay it works

i used that coding
and changed it to @username


thanks man
Back to top
Micky G
Member
Member


Joined: 30 Dec 2003
Posts: 144

Reputation: 31.5Reputation: 31.5Reputation: 31.5

PostPosted: Wed Dec 31, 2003 4:32 pm    Post subject: Reply with quote

What would this be for the wired bot code though. it doesnt work for wired.
Back to top
Nate
God Like
God Like


Joined: 12 Nov 2003
Posts: 553

Reputation: 41.3Reputation: 41.3Reputation: 41.3Reputation: 41.3

PostPosted: Wed Dec 31, 2003 7:35 pm    Post subject: Reply with quote

You can make it work for WiredBots code, you just have to change a few things.

1. Wherever there's an IF/ELSIF for a command like this, change it to a sub.
Example: if ($msg =~ /\/help/i) == sub help {

2. Immediately after the sub you'll need $victim, $msg, and $self from the shift. If $self isn't being sent, look from on_im.pl to commands.pl to make sure it is being sent a recieved from the shifts.
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Thu Jan 01, 2004 12:29 pm    Post subject: Reply with quote

Well for me it worked in the WiredBots code, without editing...
_________________
Sypher
Developer of Codera
Back to top
Micky G
Member
Member


Joined: 30 Dec 2003
Posts: 144

Reputation: 31.5Reputation: 31.5Reputation: 31.5

PostPosted: Thu Jan 01, 2004 1:27 pm    Post subject: Reply with quote

Thanx Nate, That helped a lot. :rolleyes:
Back to top
VIPER
Young One
Young One


Joined: 22 Nov 2003
Posts: 50

Reputation: 30.9Reputation: 30.9Reputation: 30.9

PostPosted: Thu Jan 01, 2004 1:38 pm    Post subject: Reply with quote

anyway to make it shut the f**k in the chat??
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Thu Jan 01, 2004 1:44 pm    Post subject: Reply with quote

QUOTE(VIPER @ Jan 1 2004, 05:38 AM)
anyway to make it shut the f**k in the chat??

use the !silence function (anywhere in this forum)

_________________
Sypher
Developer of Codera
Back to top
Micky G
Member
Member


Joined: 30 Dec 2003
Posts: 144

Reputation: 31.5Reputation: 31.5Reputation: 31.5

PostPosted: Thu Jan 01, 2004 1:51 pm    Post subject: Reply with quote

What if it was a - if ($msg =~ /^\/block (.*)/i) And you have a variable? How would you put that into a sub?
Sad
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Mon Jan 05, 2004 1:16 pm    Post subject: Reply with quote

I want the bot to respond in the chat..

Because if nobody talks you can't chat Razz So i want to bot to say "Hi $victim" (in the CHAT-room)..

Can that be done? If so... How? Smile

Tnx

_________________
Sypher
Developer of Codera
Back to top
jordanovjarra
Member
Member


Joined: 07 Nov 2003
Posts: 140

Reputation: 33.2Reputation: 33.2Reputation: 33.2

PostPosted: Mon Jan 05, 2004 1:31 pm    Post subject: Reply with quote

put this into sub join if i remember rightly
$self->sendmsg("Welcome $user");
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Mon Jan 05, 2004 1:51 pm    Post subject: Reply with quote

Nope, That doesn't work.. I already have a welcomemsg and nobody sees that one:(
_________________
Sypher
Developer of Codera
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Mon Jan 05, 2004 2:08 pm    Post subject: Reply with quote

this could have something to do with sockets.
like to make a bot only talk in the chat socket.
only a suggestion if im rong ignore me Smile
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Mon Jan 05, 2004 2:12 pm    Post subject: Reply with quote

Well if you have a code to do so ..... Smile

Sounds good btw Razz

_________________
Sypher
Developer of Codera
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



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