then you should post those links slyvar.
with just a quick look at this code it's obviously unique. my guess is that this is n3m3s1s's style of coding.
this is not needed.
sockwrite -n $sockname Connection: Close
sockwrite -n $sockname Content-Type: text/html
these are already defaults for youtube servers.
nobody does this
if (%ytube2 == $null) && (%sockread == $null) { noop }
this would be more normal
if (!%ytube2) && (!%sockreadl) { noop }
but most people would use a positive check for this anyway.
also %sockread isn't even needed. a simple check for could be used to close the socket if it dropped past the title check.
and this:
while ([ $chr(36) $+ [ %ytube4 ] ]) {
thats really abnormal.
this would be more normal
while ($+($,%ytube4)) {
and even with that the method used here is very unique and not something you most would even think of.
this would be a more rational approach.
on *:TEXT:*youtube*:#: {
while ($1) {
if (www.youtube.com/watch?v= isin $1) {
sockclose youtube
youtube $1
}
tokenize 32 $2-
}
}
and even that is in error because it still checks every token for a link just because youtube was said in a channel.
most people would just check for the link in the on text event.
i could keep going ....
everything about this code is unique and NONE of it is YOURS.
changing variable names and channel messages slightly is not writing a script. you didn't write any of this and you should be ashamed for posting it.
at least conform to the rules and post the link that you ripped it from.