Slogan Generator

By Phoenix- on Sep 20, 2009

A friend wanted this. Took less than 5 minutes to make after he found a site I could socket to.
(+) It has a 10 second spam protection
(+) Has an On Load script to set the bot's name the script will run on
(+) Sockets to

on *:load:{ set %name.slogan $?="Enter the name of the bot you wish to have the Slogan Script run." }
on *:text:*:#:{ if (slogan isin $1) && ($left($1,1) isin .`!@) { if ($me == %name.slogan) { if (!$sock(slogan)) && (!%slogan.spam [ $+ [ $Nick ] ]) { set -u10 %slogan.type $left($1,1) | set -u10 %slogan.spam [ $+ [ $Nick ] ] 1 | tokenize 32 $remove($strip($1-),$chr(124),$chr(36)) | set %slogan.nick $nick | set %sloganName $2- | sockopen slogan 80 | set %slogan.chan $chan } } } }
on *:sockopen:slogan:{ tokenize 62 $sock(slogan).mark | sockwrite -nt $sockname GET $+(/slogan.cgi?word=,%sloganName) HTTP/1.0 | sockwrite -nt $sockname Host: $+ $crlf $+ $crlf }
on *:sockread:slogan:{ sockread %slogan | tokenize 62 $sock(slogan).mark | if (*<p class="mov">Paste <b>* iswm %slogan) { set %slogan.end $remove(%slogan,<p class="mov">Paste <b>,</b> into a web) | $iif(@ == %slogan.type,$iif(c isincs $chan(%slogan.chan).mode,msg %slogan.chan [Slogan] %slogan.end,msg %slogan.chan $+($chr(3),00,$chr(44),01[,$chr(3),4,$chr(44),1,Slogan,$chr(3),0,$chr(44),1],$chr(3),04,$chr(44),01,$chr(32),%slogan.end)),notice %slogan.nick $+($chr(3),00,$chr(44),01[,$chr(3),4,$chr(44),1,Slogan,$chr(3),0,$chr(44),1],$chr(3),04,$chr(44),01,$chr(32),%slogan.end)) | unset %slogan* | sockclose $sockname } } 


Sign in to comment.
Jethro   -  Sep 21, 2009

lol sunslayer, I know that word is not popularly used (though I've heard and seen people converse in that word), but it's in the dictionary. And it simply means: >

  1. being more than is sufficient or required; excessive.
  2. unnecessary or needless.

Also, Phoenix, it's always a best practice to include parenthesis in your regex. Believe it or not, sometimes a regex fails to work without them...or when you have more than one matching range on the same line.

By the way, nice script you've posted.

Phoenix-   -  Sep 21, 2009

Oh wait a minute. I feel pretty stupid right now LOL.
I normally do a regex match like that with /i but I completely forgot about /S
The only reason I did it like that was because people use the scripts to talk in color (which is incredibly annoying and retarded) so I made it like that to prevent it.
So yes, I could do /^[.`!@]slogan/Si

sunslayer   -  Sep 21, 2009

superflous? lol
thesaurus plz :p

Jethro   -  Sep 20, 2009

sunslayer, I think it's best to add a $ or \b at the end of matching range so that it won't trigger upon text following it:




In addition, it's spelled unnecessary. Or unneeded. Or needless. Or superfluous. Whichever you prefer.

sunslayer   -  Sep 20, 2009

after probably close to a minute of spacing the code out...

using * as the only matchtext uses much more cpu compared to using a regex match like


and also allows you to remove

if (slogan isin $1) && ($left($1,1) isin .`!@) {
  tokenize 62 $sock(slogan).mark

is unnecisary(i think thats correct spelling?) as you dont use a token identifier nor do you even use the sockmark command

this is probably one of my longest comments ever.

but either way it works and serves some fun for a lil while

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.