User Control Panel
Advertisements

HELP US, HELP YOU!

!chat command (popup)

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


Joined: 07 Apr 2004
Posts: 31

Reputation: 25.9Reputation: 25.9Reputation: 25.9

PostPosted: Sun Apr 11, 2004 9:06 pm    Post subject: Reply with quote

im trying to make a !chat room, i have edited the code, but it seems to say !chat not a command, but it is, where am i sopposed to put it in this 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 /><br />if ($bot->{users}->{$user}->{chatban} eq 'banned')<br />{return"sorry you are banned from chat....please type $bot->{settings}->{CommandChar}gettrev if you think this is wrong"}<br />elsif ($bot->{settings}->{chatlock} eq 'locked')<br />{return"the chat has been locked......please try again later:("}<br />  elsif ($msg eq '')<br />  {<br />      $user_settings->{callback} = "chat";<br />      return "                  ...:: 3Dwights 7Chat 12Room ::..<br />13Rules:<br />2*NO inviting other bots<br />*NO inviting troublesome users<br />*NO spamming/flooding<br />*NO swearing<br />*NO racism<br />*NO playing games in the chatroom<br />4if you agree please type (173,173,209)!chat ok 1Thanks";<br />  }            <br />  elsif ($msg eq 'ok')<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 /><br />          return "3There is 4NO 7chat, im going to create a chat using this conversation<br /><br /><br /> 6Dwight Bot, just made this the chat!!!!";<br />      }<br />      elsif ($self eq $bot->{chatroom})<br />      {<br />          return "12well you big fat 5RETARD 2<br /> ..:: This is Chat ::.. :D :D :D :)";<br />      }<br />      else<br />      {<br />          $bot->{chatroom}->invite($user);<br />          return "10Thank you for agreeing to the rules !!! Please wait while i invite you to the chat, if you are not invited please type !getdwight !!<br /><br />         13thanks!";<br />      }<br />  }<br />  else<br />  {<br />      $user_settings->{callback} = "";<br />      return "4If You Dont Agree To The Rules Then Go Away,Other Wise Type ok1";<br />  }<br />     <br />}<br /><br />{<br />   Category    => '(8)CHAT(8)',        <br />   Description => 'start a chat room',<br />};


EX. if i type !chat and theres no chat, then how can i get it to popup a message saying
NEW CHAT CREATED!! Type !chat to access it!!!
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

Reputation: 44.1Reputation: 44.1Reputation: 44.1Reputation: 44.1

PostPosted: Sun Apr 11, 2004 9:31 pm    Post subject: Reply with quote

http://www.bot-depot.com/forums/index.php?...&hl=sub+chatter
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