!Slang
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 7.5 (of 2 scores) |
| Date Added | Aug 13, 2007 |
| Last Updated | Sep 23, 2007 |
| Tags | dictionary slang urban |
Introduction
UPDATED!
I added flood protection so any regular user in a channel can't use it more than 3 times in 30 seconds.
This script can be used to look up a slang word definition from Urban Dictionary.
Usage: !slang 1 word
(This retrives the first result for *word* of 53 results.) i.e. 1/53
!slang 2 word
(Retrives the second result for *word*.) i.e. 2/53
!Random (Retrives a random slang word)
!Related Word (finds up to 10 words with a similar meaning to word)
!Nearby Word (finds 10 words listed nearby word alphabetically)
!wod retrives todays Word Of the Day.
!spell word (uses google suggest function which isn't all that great imo)
!slanghelp will list usage examples.
Since this script uses my web sites resources I would appreciate a link to http://www.MyWebs.biz/ in exchange for me allowing others to use my bandwidth and resources. If you have a web page somewhere please put up a link to my site using *My Webs* as the link text. (without the *'s) Example HTML code is included in the script up top! Thank You!
Most of this scripts logic is written in PHP, on my web site, that uses SOAP to connect to Urban Dictionary's API. This IRC script mostly just passes the variables via GET variables to my web page. This is where the real work is done.
One known bug: When you look up a word with an apostrophe ' it won't return any results when it should. Its not that big of a deal since not many words have an ' in them. If anyone can solve this please comment below.
This IRC script also uses another persons socket code. URL: http://www.mircscripts.com/cgi-bin/file.php?id=897 This code is mostly left unchanged. It doesn't always properly split the message into small enough chunks and you won't always see the whole thing that gets returned because its too long. If anyone finds a fix for this please comment the script and I will update the IRC script code.
WARNING: Urban Dictionary is not appropriate for all audiences! Slang words often contains curse words!
Thank You,
MyWebs
mIRC Snippet:
!Slang
Posted on Aug 13, 2007 11:00 am
Posted on Aug 13, 2007 11:00 am
Thanks napa182.
I'd like to clarify one point. If you look up a word and see more than 1 result returned you can look up each and every result one at a time.
For example if you type !Slang 1 bed ... you will see:
(1/8)-bed **Definition** a matress on a stand or on the floor (lol) that has a blanket and pillows on it and u got to sleep on it coz sleep is so good **Example** im gonna go hit the sac... then im gonna go to bed ;) **Author** flash **URL** http://www.urbandictionary.com/define.php?term=bed&defid=778262 [782]
That 8 means there are 8 entries for bed. To see the next result you can type !Slang 2 bed all the way up to !slang 8 bed. Some Slang words have hundreds of entries. They are ranked by most votes.
Some entries are quite long and will flood ur channel. Not much I can do about that really. lol
Thanks,
MyWebs
I'd like to clarify one point. If you look up a word and see more than 1 result returned you can look up each and every result one at a time.
For example if you type !Slang 1 bed ... you will see:
(1/8)-bed **Definition** a matress on a stand or on the floor (lol) that has a blanket and pillows on it and u got to sleep on it coz sleep is so good **Example** im gonna go hit the sac... then im gonna go to bed ;) **Author** flash **URL** http://www.urbandictionary.com/define.php?term=bed&defid=778262 [782]
That 8 means there are 8 entries for bed. To see the next result you can type !Slang 2 bed all the way up to !slang 8 bed. Some Slang words have hundreds of entries. They are ranked by most votes.
Some entries are quite long and will flood ur channel. Not much I can do about that really. lol
Thanks,
MyWebs
mIRC Snippet:
!Slang
Posted on Apr 10, 2008 2:31 pm
Posted on Apr 10, 2008 2:31 pm
You could just "unset %slang* %related*" etc
mIRC Snippet:
!Slang
Posted on May 21, 2008 6:33 pm
Posted on May 21, 2008 6:33 pm
Actually, this can still be used for spam. My friend did "!slang 2 Noob" and a lot of messages starting appearing in the channel and eventually led to Excess Flood.
Could you make it possible on !slang it will do a ".notice $nick"
And on a @slang it will do a ".msg $chan"
That would be greatly appreciated, and I say the . before msg/notice as it won't flood me, if you didn't know that :p
Could you make it possible on !slang it will do a ".notice $nick"
And on a @slang it will do a ".msg $chan"
That would be greatly appreciated, and I say the . before msg/notice as it won't flood me, if you didn't know that :p
mIRC Snippet:
!Slang
Posted on May 21, 2008 6:56 pm
Posted on May 21, 2008 6:56 pm
Yes, but I've never tried to script PHP or learn it at least lol. I'm totally lost with it.
But from the random testing of just trying stuff, I've found Line 149 - " /request example2 %SlangURLS7 $chan 4,1", if you change $chan to $nick, it will PM the person instead... My only problem is changing it do a .notice message.
However for the messaging $chan part... thats simple, leave it the same and change !slang to @slang =/ BUT I still need it to be .msg
So Napa, as smart as you are, you might be able to give me a hint :P
But from the random testing of just trying stuff, I've found Line 149 - " /request example2 %SlangURLS7 $chan 4,1", if you change $chan to $nick, it will PM the person instead... My only problem is changing it do a .notice message.
However for the messaging $chan part... thats simple, leave it the same and change !slang to @slang =/ BUT I still need it to be .msg
So Napa, as smart as you are, you might be able to give me a hint :P
mIRC Snippet:
!Slang
Posted on May 21, 2008 8:49 pm
Posted on May 21, 2008 8:49 pm
um you wont beable to change the php side of this script cuz it's not on here. Tony has this set up to send the info to his page then it pulls it from there to mirc.
but you can replace the !slang part with this
but you can replace the !slang part with this
| Code: |
| on *:TEXT:!Slang *:#: { if ($2 !isnum) { .notice $nick $2 is not a number. Enter a number for the number of the result you want. i.e !slang 1 $2- | halt } set %slangchan2 $chan set %slangnick $nick set %Asc2 $replace($3-,$chr(32),$chr(37) $+ 20) ;set %Asc2 $replace($3-,$chr(32),+) set %Asc3 $replace(%Asc2,$chr(39),$chr(37) $+ 27) ;set %Asc3 $replace(%Asc2,$chr(39),% $+ 27) ;/msg %slangchan2 Variable Asc3: %Asc3 set %SlangURLS http://www.mywebs.biz/IRC/Slang.php?Word= $+ %Asc3 set %SlangURLS2 %SlangURLS $+ &Count= set %SlangURLS3 %SlangURLS2 $+ $$2 ;/msg %slangchan2 URL: %SlangURLS3 /request example2 %SlangURLS3 %slangchan2 11,2 unset %slang* %Asc* } |
mIRC Snippet:
!Slang
Posted on May 21, 2008 8:51 pm
Posted on May 21, 2008 8:51 pm
you need to find this in the socketread part and use this
that should make it notice
| Code: |
| elseif (%temp != $null) { if ($hget($sockname, chunked)) { if (%chunked) { inc %read $calc($sockbr + 2) if (%read >= %len) { %chunked = $false } .notice %slangnick $hget($sockname, info) %temp } else { %read = 0 %len = $base($gettok(%temp, 1, 32), 16, 10) %chunked = $true } } else { .notice %slangnick $hget($sockname, info) %temp } } } } |
that should make it notice
mIRC Snippet:
!Slang
Posted on Jul 11, 2008 1:20 am
Posted on Jul 11, 2008 1:20 am
Thanks mate! Been looking for one that works with the sites new updates for a while! It was a very popular script in a channel of mine :D
I added a link to your site as well to show my support. http://www.mydamnsig.com
I added a link to your site as well to show my support. http://www.mydamnsig.com







