Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-17-2012, 09:16 PM
Spikedude Spikedude is offline
Senator Amsel Zephlyn
Spikedude's Avatar
Join Date: Jul 2006
Posts: 283
Spikedude will become famous soon enough
Script to Check RC Chat

Is it possible to have a script that checks if a certain word is said on RC? Like, for example, could you make a script that automatically disconnects people if they curse on RC Chat? I know that function onRCChat(action) is only called if someone said /npc first.

Thanks for any advice.
__________________
Reply With Quote
  #2  
Old 08-17-2012, 09:18 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
There is, but it's not possible on servers other than login servers or privileged servers.
Reply With Quote
  #3  
Old 08-17-2012, 09:19 PM
Spikedude Spikedude is offline
Senator Amsel Zephlyn
Spikedude's Avatar
Join Date: Jul 2006
Posts: 283
Spikedude will become famous soon enough
Quote:
Originally Posted by Emera View Post
There is, but it's not possible on servers other than login servers or privileged servers.
Ah, okay. Thank you. I could definitely see the potential for abuse haha.
__________________
Reply With Quote
  #4  
Old 08-17-2012, 09:20 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Spikedude View Post
Ah, okay. Thank you. I could definitely see the potential for abuse haha.
No problem.
Reply With Quote
  #5  
Old 08-17-2012, 09:40 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Spikedude View Post
could you make a script that automatically disconnects people if they curse on RC Chat?
You shouldn't want to do that anyway.

The only way to get RC chat on normal servers (I've never heard of the privileged server thing and not sure if that's true or not) is with client-RC; onRCChat is called clientside (with the line as a parameter) if you're connected to client-RC.
__________________
Reply With Quote
  #6  
Old 08-17-2012, 10:12 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by cbk1994 View Post
You shouldn't want to do that anyway.

The only way to get RC chat on normal servers (I've never heard of the privileged server thing and not sure if that's true or not) is with client-RC; onRCChat is called clientside (with the line as a parameter) if you're connected to client-RC.
I haven't heard of a privileged server thing either, and I very much doubt that's true until I see it with my own eyes.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #7  
Old 08-18-2012, 12:10 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
You shouldn't want to do that anyway.

The only way to get RC chat on normal servers (I've never heard of the privileged server thing and not sure if that's true or not) is with client-RC; onRCChat is called clientside (with the line as a parameter) if you're connected to client-RC.
Quote:
Originally Posted by xXziroXx View Post
I haven't heard of a privileged server thing either, and I very much doubt that's true until I see it with my own eyes.
I've definitely heard that somewhere before. You'll have to look into it though.
Reply With Quote
  #8  
Old 08-18-2012, 01:31 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
you can do it by parsing the last line out of the MLTextCtrl but that only works if you're using client-rc.
Reply With Quote
  #9  
Old 08-18-2012, 01:53 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Cubical View Post
you can do it by parsing the last line out of the MLTextCtrl but that only works if you're using client-rc.
If you're using client-RC, then just use the onRCChat event.
__________________
Reply With Quote
  #10  
Old 08-18-2012, 11:38 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Cubical View Post
you can do it by parsing the last line out of the MLTextCtrl but that only works if you're using client-rc.
I've done something like that before, but it's just not practical. Unless you're checking every 4-5 seconds it's going to cause quite a bit of lag.
Reply With Quote
  #11  
Old 08-18-2012, 07:44 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Emera View Post
I've done something like that before, but it's just not practical. Unless you're checking every 4-5 seconds it's going to cause quite a bit of lag.
...what? You could check it twenty times a second if you wanted without noticeably slowing the client.
__________________
Reply With Quote
  #12  
Old 08-18-2012, 08:40 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
...what? You could check it twenty times a second if you wanted without noticeably slowing the client.
That wasn't the case when I tried it.
Reply With Quote
  #13  
Old 08-18-2012, 09:34 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Emera View Post
That wasn't the case when I tried it.
Then you're doing something wrong.
__________________
Reply With Quote
  #14  
Old 08-21-2012, 08:49 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Just parse the RC log file, forgot the file path.
Then check the last lines of it for bad words.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #15  
Old 08-21-2012, 10:00 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gunderak View Post
Just parse the RC log file, forgot the file path.
Then check the last lines of it for bad words.
There is no RC chat log file kept by the server.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.