User Control Panel
Advertisements

HELP US, HELP YOU!

Staffchat and chat are the same room...

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Thu Mar 04, 2004 2:58 am    Post subject: Reply with quote

hey i created a staff chat but its the same room than the normal chat... here is the staffchat code

staff chat code

Code:
<br />if ($msg eq "staffchat") {<br />    if (!exists $msn->{staffchatroom})<br />    {<br />        $msn->{staffchatroom} = $self;<br />        &send($self, "This is now the staff chat. ");<br />    }<br />    elsif ($self eq $msn->{staffchatroom})<br />    {<br />        &send($self, "Your in the staff chat!.");<br />    }<br />    else<br />    {<br />        $msn->{staffchatroom}->invite($username);<br />        &send($self, "Ok $username im inviting you to the staff chat!");<br />    }     <br />}



The normal chat code...

Code:
# Made By Morphious Enterprises<br /><br />if ($msg eq "chat") {<br />    if (!exists $msn->{chatroom})<br />    {<br />        $msn->{chatroom} = $self;<br />        &send($self, "This is now the chat room. ");<br />    }<br />    elsif ($self eq $msn->{chatroom})<br />    {<br />        &send($self, "Your in the chat!.");<br />    }<br />    else<br />    {<br />        $msn->{chatroom}->invite($username);<br />        &send($self, "Wait i am inviting you to the chatroom!");<br />    }     <br />}



And the staffchat i puot it in the mods code... so its suppose to work only for mod+ but thats not my problem... my problem is the chat and staffchat are the same room... please help me
Back to top
MikeFairbrother
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 179
Location: United Kingdom
Reputation: 27.9Reputation: 27.9Reputation: 27.9

PostPosted: Thu Mar 04, 2004 3:43 pm    Post subject: Reply with quote

try this:

Quote:
if ($msg eq "staffroom") {
   if (!exists $msn->{staffroom})
   {
       $msn->{staffchatroom} = $self;
       &send($self, "This Is Now The Staff Room ");
   }
   elsif ($self eq $msn->{staffroom})
   {
       &send($self, "You Are Currently In The Staffroom.");
   }
   else
   {
       $msn->{staffroom}->invite($username);
       &send($self, "Ok $username Now Inviting You To The Staff Chatroom");
   }  
}


_________________
Regards,
Mike
Back to top
MikeFairbrother
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 179
Location: United Kingdom
Reputation: 27.9Reputation: 27.9Reputation: 27.9

PostPosted: Thu Mar 04, 2004 6:36 pm    Post subject: Reply with quote

speaking of staff room, does anyone know how you can improve on that command to only let mods, smods, admins, owners in?
_________________
Regards,
Mike
Back to top
MikeFairbrother
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 179
Location: United Kingdom
Reputation: 27.9Reputation: 27.9Reputation: 27.9

PostPosted: Thu Mar 04, 2004 6:37 pm    Post subject: Reply with quote

you could also make it individualised, so a admin chatroom, supermods chatroom etc...
_________________
Regards,
Mike
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Thu Mar 04, 2004 6:40 pm    Post subject: Reply with quote

It is nice but you command is working but not working you need to change

Code:
<br /><br />if ($msg eq "staffroom") {<br />   if (!exists $msn->{staffroom})<br />   {<br />       $msn->{staffroom} = $self;<br />       &send($self, "This Is Now The Staff room ");<br />   }<br />   elsif ($self eq $msn->{staffroom})<br />   {<br />       &send($self, "You Are Currently In The Staff room.");<br />   }<br />   else<br />   {<br />       $msn->{staffroom}->invite($username);<br />       &send($self, "Ok $username Now Inviting You To The Staff room");<br />   }   <br />}<br />



but when you join it does not work Razz if you leave the code like you write... it will always say This is the staff room Razz
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Sun Mar 07, 2004 4:36 pm    Post subject: Reply with quote

infact the code wouldnt work anyway. because 1s the chatroom
is made it wouldnt constantly add *lazy* to the chatroom even if there
isnt one well say that it is inviting you. you have to add more coding.
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Sun Mar 07, 2004 9:00 pm    Post subject: Reply with quote

Thanks but i fixed the code Razz
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