Yawhatnever

Yawhatnever

Joined:
Apr 30, 2012
Location:
SwiftIRC #mSL

Activity Stream

Yawhatnever commented on a Snippet, Blacklist Script v1.0  -  4 days ago
Not bad!

Why do you use this? -

Code

 
instead of

Code

 


Yawhatnever posted a Snippet  -  5 days ago
Yawhatnever commented on a Snippet, Twitch bot - Ban cmd  -  8 days ago
Here's a script I wrote: http://www.hawkee.com/snippet/9960/

I'll start by saying that it's probably not what you're looking for. However, you could re-use many of the aliases I've written for it to detect links in your twitch chat. I'd suggest opening it in another tab and then using ctrl+f to find the aliases I'm about to reference.

For example:

Code

 

This event would trigger when any URL was posted. However, it would also trigger for text like 'o.o'
To remove false matches, you would do the following:

Code

 

Inside $extractURL() I use an alias called $parseDomain(), which uses Mozilla's public suffix list to determine if the suffix used (such as .co.uk or .net) was valid or not. This means only valid domains are returned by $extractURL().

From there, you have the URLs posted inside %urls. You'd just need to loop through them and determine if the domain is whitelisted or not. For that, I have an alias called $trusted(). If $trusted(example.com) == $true, then the site is whitelisted.

It may be overkill for what you want, but if you're interested everything you'd need is in that script.
 Respond  
Yawhatnever commented on a Snippet, Save/Read Script  -  8 days ago
Using 'read' as an alias name is an ABSOLUTELY HORRIBLE IDEA because mIRC already has an identifier $read().
The same is true of /save. Just be glad you didn't call one of them /dec and then try to use it in another script inside a loop to decrease a variable (I've seen that before).

Checking if $1 is $null inside alias 'save' is redundant, because if $2 is not $null then $1 cannot be $null. Since the only valid format you have requires two parameters, you only need to check if $2 exists to know that they both exist.

Code

 
could be

Code

 
because 'save' and '.' are both literal text. There's no reason to $+() them together.
 Respond  
Yawhatnever commented on a Snippet, writing backwards  -  9 days ago
Isn't /unload -rs $script inside an on *:unload: event redundant?
 Respond  
Yawhatnever posted a Snippet  -  9 days ago
Yawhatnever commented on a Snippet, Levenshtein Distance alias  -  11 days ago
There seems to be a problem when I edit with some variables (mainly %del_cost and %below) being url decoded. If there are any problems there's a raw version here: http://pastebin.com/raw.php?i=Pd5624y2
Yawhatnever posted a Snippet  -  11 days ago
Yawhatnever commented on a Snippet, Urban Dictionary  -  Apr 11, 2013
You should consider using dynamic socket names for this to allow for simultaneous searches to happen.
 Respond  
Yawhatnever commented on a Snippet, Identify Alias  -  Jul 19, 2012
For starters, you could put this into your alias tab because that's what it is. You just have to put this on a new line:

Code

 


If you're too lazy for that, literally all you have to do is type "/alias /id /ns id %pass" into your editbox on mIRC.

Then press alt+O > connect > options > perform
add "/id" to the perform commands and it will identify you upon connecting.
 Respond  
Yawhatnever commented on a Snippet, Identify Alias  -  Jul 15, 2012
really?
 Respond  
Yawhatnever commented on a Snippet, Epic Slap Script Part 2  -  Jun 10, 2012
@Assasin@lucidchat wow, your grandmother sounds pretty cool! What network does she use if I'd like to pop in for a chat?
 Respond  
Yawhatnever commented on a Snippet, Heart Thunder  -  Jun 10, 2012
Yes it would, and if you wanted to take it a step further you could use

Code

 
$nick(#,%tnick,r) would return $null if %tnick was not a regular user on the channel. (use /help $nick for detailed information)

Negated identifiers and variables are true if the value is 0, $null, or $false.

# is interchangeable with $chan, but not $chan(). I prefer # because it's easier to type.

mIRC also lets you define and assign multiple variables at once, so

Code

 
could be turned into

Code

 
if you wanted to.

Also, I personally would change

Code

 
to

Code

 
out of habit and hopefully to ensure correct parsing, but if your way works then it's just personal preference.

Keep it up!
 Respond  
Yawhatnever commented on a Snippet, Folding@Home Stats  -  Jun 09, 2012
nice work
 Respond  
Yawhatnever commented on a Snippet, Heart Thunder  -  Jun 09, 2012

Code

 


You could shorten this to

Code

 
 Respond  
Yawhatnever commented on a Snippet, PM notifier - accept or decliner v1.1  -  Jun 09, 2012
The /dec command is already a built in function for mIRC. You should rename it, because it conflicts with any script that uses /dec to decrease a variable.

I realize this is 4-5 years old, but if anyone stumbles upon this snippet and happens to read the comments just be aware that /dec may need to be edited to /decline or something similar if you have issues.

In case you were wondering I just Googled the script after I fixed an endless loop issue for a friend caused by the conflict I described above.
Yawhatnever commented on a Snippet, Advanced User stats + Seen Database [BOT]  -  May 19, 2012
It comes down to personal preference. If you are the only person who's going to be working on the code, then do whatever makes it easiest for you to read and navigate.
 Respond  
Yawhatnever commented on a Snippet, Epic Slap Script Part 2  -  May 15, 2012

Quote

these types of slap "scripts" are generally for mIRC Scripts.

What do you mean? We're in the mIRC snippet section, isn't it obvious that they're a script for mIRC?

Quote

had slaps such as these integrated for fun. Not a big deal really.

Again, I'm not quite sure what you're talking about. It seems you think I questioned the usefulness of the script or judged it in some way? I offered another method to integrate the script that wouldn't have 60 different slaps nested in menus (as it could be difficult to find the one you were looking for). If they weren't looking for something specific on the menu, then making the output random from a single menu item would equally suit the desire to slap somebody on the internet.

For example:

Code

 


Of course use whatever is most comfortable.
 Respond  
Yawhatnever commented on a Snippet, jaytea's Highlight Thing  -  May 14, 2012
I ended up replacing all extra spaces while storing the line with this:

Code

 

and then for hotlinks I used:

Code

 


and then to find the text in the window I either used /findtext if no extra spaces had been replaced, or used a com if they had:

Code

 


It will still break if somebody actually sends a message with $chr(160)... but I'll take my chances on that one :P

I modified a number of other things to fit my own preferences, but I really couldn't find anything to improve.

 Respond  
Yawhatnever commented on a Snippet, Epic Slap Script Part 2  -  May 12, 2012
What if you just made a single slap menu item and then had the output be random? If you want to slap with something specific you could always just type it out, as I'm sure finding the right item on the list is equally (if not more) difficult than simply typing the message. You could even shorten what you type by making a slap alias in your aliases file. Something like "/slap /describe $active slaps $2 around a bit with a $$3-" would do the trick.

If you happen to like the idea of a random slap, I'd look up $read() and consider storing the possible slaps within a plain text file in your mirc folder.
 Respond  
Yawhatnever commented on a Snippet, Some Bot Commands   -  May 11, 2012
@SunnyD I think $nick() supports nick prefixes too but as an undocumented feature. I might be wrong but investigate for yourself.

if (!$2) || (!$3) || (!$4)
could be shortened to "if (!$4)" because if the fourth token exists then the second and third must exist.

just be aware that !$4 means the fourth token could be $null, 0, or $false. if the command needs a specific type of input you might want to use comparisons such as isnum (for days).

"$chan" and "#" are interchangeable as well, just a tip.

Keep it up.
 Respond  
Yawhatnever commented on a Snippet, Ident Based kick/ban upon joining  -  May 10, 2012
@JoKabua
using gooshie's code you would add idents inside $istok(), separated by spaces

using the original code you would need to add additional "elseif ($1 == ident) { return $true }" inside the BadIdentCheck alias.
 Respond  
Yawhatnever commented on a Snippet, Now playing Radio Station (shoutcast based)  -  May 09, 2012
Alright, cool.
 Respond  
Yawhatnever commented on a Snippet, jaytea's Highlight Thing  -  May 09, 2012
edited:

Ok, so I tracked down a bug that happened literally on my first test message of the highlight window. I was using mibbit to test and it seemed to be failing to change colors and be clickable for some of the lines.

Eventually I realized it was because mibbit adds another space after tabbing a name. Consecutive spaces and trailing spaces are causing $fline to fail on the hotlink because the line in the hash has had the extra spaces stripped out during /hl_addLine.

I managed to find a workaround by replacing the extra $chr(32) with $chr(160) and then replacing them back for $hl_findLine so that the line would change colors and was clickable, but again ran into mIRC stripping all of the spaces for /findtext :(

I can't find any way to manipulate a window to scroll to the correct line to avoid /findtext (somebody suggested $com but it took 7 seconds to scroll 1500 lines) and I also can't figure out any way to keep /findtext from stripping the extra spaces. Using ctrl+f with multiple consecutive spaces does work, so I think I'll try to use sendKeys for that (I barely understand COM yet :( )

It wasn't your fault, just "mIRC being an asshole" (direct quote).

Beautiful script though, I learned a lot just figuring out how it works :P
 Respond  
Yawhatnever commented on a Snippet, Advanced User stats + Seen Database [BOT]  -  May 09, 2012
They're saying the script contains an excessive number of lines that have been commented out. A lot of comments can be a good thing if they're explaining how the script works, but it seems as if the majority here are just asterisks to make the white space pretty.
 Respond  
Yawhatnever commented on a Snippet, Now playing Radio Station (shoutcast based)  -  May 09, 2012
Nice script. Cleanly written and even has a few explanations in the comments.

Just curious, is line 68 where it also sends the listeners/peak etc. meant to be commented out?

Also, did you mean to /notice %np_nick rather than $nick during the sockread if $sockerr was greater than 0?
Yawhatnever commented on a Snippet, My bot script  -  May 08, 2012
You can replace $chan with #

It's easier to type which might come in handy when it's used 40 times in one script (like yours). Just a tip.
 Respond  
Yawhatnever commented on a Snippet, Highlight flood protection  -  May 07, 2012
That's cool. You could also halt the display of highlight messages and echo them back without the highlight, rather than ignore the message completely. Just an idea.
 Respond  
Yawhatnever commented on a Snippet, The MailServ - Beta 0.3   -  May 07, 2012
It would be a good idea to use /set -n
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.