Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Script to Check RC Chat (https://forums.graalonline.com/forums/showthread.php?t=134266999)

Spikedude 08-17-2012 09:16 PM

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.

Emera 08-17-2012 09:18 PM

There is, but it's not possible on servers other than login servers or privileged servers.

Spikedude 08-17-2012 09:19 PM

Quote:

Originally Posted by Emera (Post 1701984)
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.

Emera 08-17-2012 09:20 PM

Quote:

Originally Posted by Spikedude (Post 1701985)
Ah, okay. Thank you. I could definitely see the potential for abuse haha.

;) No problem.

cbk1994 08-17-2012 09:40 PM

Quote:

Originally Posted by Spikedude (Post 1701983)
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.

xXziroXx 08-17-2012 10:12 PM

Quote:

Originally Posted by cbk1994 (Post 1701988)
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.

Emera 08-18-2012 12:10 AM

Quote:

Originally Posted by cbk1994 (Post 1701988)
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 (Post 1701997)
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.

Cubical 08-18-2012 01:31 AM

you can do it by parsing the last line out of the MLTextCtrl but that only works if you're using client-rc.

cbk1994 08-18-2012 01:53 AM

Quote:

Originally Posted by Cubical (Post 1702013)
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.

Emera 08-18-2012 11:38 AM

Quote:

Originally Posted by Cubical (Post 1702013)
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.

cbk1994 08-18-2012 07:44 PM

Quote:

Originally Posted by Emera (Post 1702038)
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.

Emera 08-18-2012 08:40 PM

Quote:

Originally Posted by cbk1994 (Post 1702045)
...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.

cbk1994 08-18-2012 09:34 PM

Quote:

Originally Posted by Emera (Post 1702048)
That wasn't the case when I tried it.

Then you're doing something wrong.

Gunderak 08-21-2012 08:49 AM

Just parse the RC log file, forgot the file path.
Then check the last lines of it for bad words.

cbk1994 08-21-2012 10:00 AM

Quote:

Originally Posted by Gunderak (Post 1702235)
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.


All times are GMT +2. The time now is 01:14 AM.

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