|
| Author |
Message |
jeanhub Almost An Agent

Joined: 14 Feb 2004 Posts: 1138
 
|
Posted: Thu Mar 04, 2004 2:58 am Post subject: |
|
|
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

Joined: 14 Feb 2004 Posts: 179 Location: United Kingdom
   
|
Posted: Thu Mar 04, 2004 3:43 pm Post subject: |
|
|
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

Joined: 14 Feb 2004 Posts: 179 Location: United Kingdom
   
|
Posted: Thu Mar 04, 2004 6:36 pm Post subject: |
|
|
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

Joined: 14 Feb 2004 Posts: 179 Location: United Kingdom
   
|
Posted: Thu Mar 04, 2004 6:37 pm Post subject: |
|
|
you could also make it individualised, so a admin chatroom, supermods chatroom etc... _________________ Regards,
Mike |
|
| Back to top |
|
 |
jeanhub Almost An Agent

Joined: 14 Feb 2004 Posts: 1138
 
|
Posted: Thu Mar 04, 2004 6:40 pm Post subject: |
|
|
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 if you leave the code like you write... it will always say This is the staff room  |
|
| Back to top |
|
 |
Stephen Senior Member

Joined: 03 Dec 2003 Posts: 159
   
|
Posted: Sun Mar 07, 2004 4:36 pm Post subject: |
|
|
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

Joined: 14 Feb 2004 Posts: 1138
 
|
Posted: Sun Mar 07, 2004 9:00 pm Post subject: |
|
|
Thanks but i fixed the code  |
|
| Back to top |
|
 |
|