Speak English Only
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 3.5 (of 2 scores) |
| Date Added | Sep 01, 2009 |
| Last Updated | Sep 10, 2009 |
| Tags | english french german italian only spanish translate warn |
Introduction
It only works if they are not an operator, and the holder of this script is an operator.
This is fairly basic because it only looks for common greeting words, and only warns. I'd like to get it to kick on the 2nd offense.
It supports Spanish, Portugese, German, and Italian. Feel free to add more words/languages.
If you're finding you need this script a lot, you might want to include a !translate function. I am using mountaindew's Google Translator in case the bot does not recognize a word. Said script can be found here: http://www.hawkee.com/snippet/4103/
Please let me know if you're going to use it! I'd like to get a count if anyone will use.
Changelog
Regular Expressions
Script now uses Regular Expressions, also known as Regular Expressions. Allows for higher accuracy, but not fool proof.
Exact Identification
Script now looks for the exact word, and warns it. It used to say:
| Quote: |
<someone>: Yes please <bot>: someone: Englisch sprechen, bitte. |
Thank You Jethro_
mIRC Snippet:
Speak English Only
Posted on Sep 2, 2009 12:13 am
Posted on Sep 2, 2009 12:13 am
Your script has some drawbacks...if someone say yes or directory it will trigger the German warning...so will other languages if any English words consists of triggers in the regex matching range. I will add a $ symbol at the end to make sure it ends with that certain match, and your script can be combined using one text event, and @ symbol in the text event is an equivalent to if ($me isop #):
But it's still not 100% foolproof; the script can still get triggered on certain match by accident.
| Code: |
| on @*:TEXT:*:#: { var %spanish = /(hola|como|buenos|estan|buenas|tardes|si|noches)$/iS var %portugese = /(ola|Como|vai|você|bom|sim)$/iS var %german = /(ja|danke|wie|geht|es|dir|Guten|Morgen|nein|nicht)$/iS var %italian = /(Ciao|come|stai|buon|giorno|pomeriggio|notte|salve|sera|sta|grazie|centiamo|bene)$/iS if ($nick !isop $chan) { if ($regex($1-,%spanish)) { .msg $chan 4 $+ $nick $+ : 4Sólo hablan Inglés. 7[Spanish/Español] } if ($regex($1-,%portugese)) { .msg $chan 4 $+ $nick $+ : 4Por favor, fale Inglês. 7[Portugese/Português] } if ($regex($1-,%german)) { msg $chan 4 $+ $nick $+ : 4Englisch sprechen, bitte. 7[German/Deutsch] } if ($regex($1-,%italian)) { msg $chan 4 $+ $nick $+ : 4Si prega di parlare inglese. 7[Italian/Italiano] } } } |
mIRC Snippet:
Speak English Only
Posted on Sep 4, 2009 4:41 pm
Posted on Sep 4, 2009 4:41 pm
I tried it in my channel. Not once anyone spoke in anything else than english but it warned alot. Good idea, but needs some work.
mIRC Snippet:
Speak English Only
Posted on Sep 4, 2009 4:47 pm
Posted on Sep 4, 2009 4:47 pm
Can you post some of the instances it warned?
mIRC Snippet:
Speak English Only
Posted on Sep 4, 2009 5:30 pm
Posted on Sep 4, 2009 5:30 pm
[22:42:41] <00Big_Boss> ignores opers
[22:42:41] <07&Helios> 4Big_Boss: 4Englisch sprechen, bitte. 7[German/Deutsch]
[22:37:19] <00Stevo127> You stupid bastard
[22:37:20] <07&Helios> 4Stevo127: 4Si prega di parlare inglese. 7[Italian/Italiano]
[22:25:24] <00Stevo127> Old mIRC version
[22:25:25] <07&Helios> 4Stevo127: 4Sólo hablan Inglés. 7[Spanish/Español]
[22:17:06] <00Stevo127> im tryin to get his attension
[22:17:07] <07&Helios> 4Stevo127: 4Sólo hablan Inglés. 7[Spanish/Español]
[22:42:41] <07&Helios> 4Big_Boss: 4Englisch sprechen, bitte. 7[German/Deutsch]
[22:37:19] <00Stevo127> You stupid bastard
[22:37:20] <07&Helios> 4Stevo127: 4Si prega di parlare inglese. 7[Italian/Italiano]
[22:25:24] <00Stevo127> Old mIRC version
[22:25:25] <07&Helios> 4Stevo127: 4Sólo hablan Inglés. 7[Spanish/Español]
[22:17:06] <00Stevo127> im tryin to get his attension
[22:17:07] <07&Helios> 4Stevo127: 4Sólo hablan Inglés. 7[Spanish/Español]
mIRC Snippet:
Speak English Only
Posted on Sep 5, 2009 1:12 pm
Posted on Sep 5, 2009 1:12 pm
Anyhow it's basically fixed. There are some things it still picks up in German, and "Hola" does for both Portugese and Spanish.
mIRC Snippet:
Speak English Only
Posted on Sep 5, 2009 2:33 pm
Posted on Sep 5, 2009 2:33 pm
miniCruzer, add \b anchor to every of your regex matches like this:
This will greatly minimize the chances of being triggered wrongly if any word or letter said within the matching text. And remove the dollar sign at the end of them.
I think it's rude and arrogant to laugh at people's scripts without giving his or her suggestion for improvement.
| Code: |
| /(\bbola\b|\bComo\b|\bvai\b|\bvocê\b|\bbom\b|\bsim\b)/iS |
I think it's rude and arrogant to laugh at people's scripts without giving his or her suggestion for improvement.
mIRC Snippet:
Speak English Only
Posted on Sep 5, 2009 3:29 pm
Posted on Sep 5, 2009 3:29 pm
Nice.
"centiamo" isnt italian :D
| Code: |
var %italian = /(Ciao|come|stai|buon|giorno|pomeriggio|notte|salve|sera|sta|grazie|centiamo|bene)$/iS |
"centiamo" isnt italian :D
mIRC Snippet:
Speak English Only
Posted on Sep 7, 2009 9:46 am
Posted on Sep 7, 2009 9:46 am
@ Jethro_: Who laughed at the script?
mIRC Snippet:
Speak English Only
Posted on Sep 10, 2009 5:57 pm
Posted on Sep 10, 2009 5:57 pm
@ Bubble: I deleted the comments =/ No one "laughed"


