User Control Panel
Advertisements

HELP US, HELP YOU!

Command Discription help

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
paulwinter40
Newbie
Newbie


Joined: 19 Jan 2004
Posts: 28

Reputation: 28.5Reputation: 28.5Reputation: 28.5

PostPosted: Fri Mar 05, 2004 11:32 pm    Post subject: Reply with quote

At Current , My Commands Are as followed.....

!admins
!chat
!invite
!leave
!link
!menu
!mods
!news
!nickname
!powers
!smods
!speak
!stats
!time

When I Edit the names so they appear like this....

!chat - Invites You To The ChatRoom, the code nolonger works, only when its on its own, the codeing is:

[/CODE]
if ($msg eq "chat") {
if (!exists $msn->{chatroom})
{
$msn->{chatroom} = $self;
&send($self, "This is now the chat room. ");
}
elsif ($self eq $msn->{chatroom})
{
&send($self, "Your in the chat room.");
}
else
{
$msn->{chatroom}->invite($username);
&send($self, "Inviting you to the chat room now!");
}
}
[CODE]


I Wish To Add adesciption of wut the command does, but if i do, it no longer works? Any Suggestions? maybe its something to do with changing if ($msg eq "chat") { if i add something to the ''chat'' ? Please Reply Asap, Ty
Back to top
WinterBot
Member
Member


Joined: 17 Jan 2004
Posts: 108

Reputation: 30.2Reputation: 30.2Reputation: 30.2

PostPosted: Fri Mar 05, 2004 11:57 pm    Post subject: Reply with quote

i know this is off topic but i like how you copied keenies signature <_<


annnndd.. i dont think it has anything to do with ($msg eq "chat") heres my code

Code:
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 (!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 /><br />{<br />    Category    => 'Public Commands-(au)',         <br />    Description => 'start a chat room', <br />};
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