turbuiance

turbuiance

Joined
Dec 04, 2011

Activity Stream

turbuiance commented on a Page, English Slang Definition Checker  -  Jun 28, 2012

can someone repost the change so it only spits out one line if its a long definition? So it doesnt keep breaking it up into several lines? thanks

 Respond  
turbuiance commented on a Page, !IMDB Movie Search  -  Apr 01, 2012

Fix for Short Plot:
I altered the code some but on mine it is line 116. (just do a search in the snippet for "description" (no quotes).. on that line

elseif (%imdb == <p itemprop="description">) sockmark $sockname $puttok($sock($sockname).mark,shortplot:,4,32)

you need to add a

infront of the <p
like this:

elseif (%imdb == <p><p itemprop="description">) sockmark $sockname $puttok($sock($sockname).mark,shortplot:,4,32)

that's it.. i have tried with 5+ movies and all the short plots have worked.. im sure ford has a better way, but this is what i could figure out until he gets a change to update.. Finally i get to help on here instead of needing help.. lol

 Respond  
turbuiance commented on a Page, Pandoras Talking Bot  -  Mar 22, 2012

thanks manic.. I understand all of that.. Appreciate you trying to help tho.. My main issue is "I have tried with no success .. How would i make it so i don't have to turn the bot on? So it would be turned on in any room.. Im using one of my pandorabots and added it to the list that you made.. I would basically just want the script to be auto on in every room I join and have my pandorabot be the one selected.. If thats possible.. or even a On/off trigger someone could use in the channel incase im not infront of the computer to turn on myself... Thanks! " Like a !boton or !botoff command for it.. I have fiddled with the one in the above comments but that doesnt seem to work..

 Respond  
turbuiance commented on a Page, Pandoras Talking Bot  -  Feb 11, 2012

Thanks ford.. great snippet.. Question.. I have tried with no success .. How would i make it so i don't have to turn the bot on? So it would be turned on in any room.. Im using one of my pandorabots and added it to the list that you made.. I would basically just want the script to be auto on in every room I join and have my pandorabot be the one selected.. If thats possible.. or even a On/off trigger someone could use in the channel incase im not infront of the computer to turn on myself... Thanks!
Oh one other thing.. When the question is sent to pandorabot.com does it include the bots name? I'm training a bot just wondering if when someone asks "bot how are you?" if "bot how are you?" is sent for a response or "how are you?" is sent? If bot name is sent too, is there a way to remove it when the question is sent.. Reason i ask is because sometimes i get weird responses back from pandorabots and i believe its because the bots name is included in the question.. I have it set so it loses focus of someone after 3 seconds so people have to keep sayng bot name to carry a convo with it. THanks again ford! Great jon on all your snippets

 Respond  
turbuiance commented on a Page, Links Remover  -  Jan 12, 2012

this only seems to work sometime when i try to turn on...
I had to change command to !links on/off because some chats on server auto *** the word link.. Not sure why its not responding to turning on and off on commands sometimes but works fine other times..

 Respond  
turbuiance commented on a Page, Pandoras Talking Bot  -  Dec 29, 2011

thanks ford, but that doesn't seem to stop the bot from responding to people. I se it to 2 and it would respond to people minutes after the first response without them saying its name again..

 Respond  
turbuiance commented on a Page, Pandoras Talking Bot  -  Dec 28, 2011

or maybe a timer? that would shut focus off for that person after a set amount of time?

 Respond  
turbuiance commented on a Page, Pandoras Talking Bot  -  Dec 28, 2011

is there a way to make the bot only respond once or twice to someone and stop automatically? i have had a problem with the bot staying focused on people and have to keep saying shutup in the chat. maybe so the bot would respond once or twice if someone says its name then stops until its name is called again? thanks in advance

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 07, 2011

thanks guys

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 07, 2011

thanks S reject.. I dont really understand that too much.. a little out of my league.. this is what i came up with

on $:text:/.(?=com\b|net\b|org\b|ca\b|uk\b|tv\b|name\b|ly\b)/iS:#:{
if (%links == 1) {
.kick # $nick 2 | /describe $chan Whoa! $nick $+ , Didn't you read the rules below?? Take this time to read them B)
}
}
on
:text:!Links on:#:{
%links = 1
describe $chan Links are now going to get Timeouts.
}
on *:text:!Links off:#:{
%links = 0
describe $chan Links are now Allowed.
}

seems to work for what i need.. Do you have any idea how i would add a Mod checker to my code above?
Btw, Im just learning if you couldn't tell, or i would use your code.. its a little to advanced.. want to try to make my own for the most part.. or atleast use ones that i understand instead of just copy and pasting and having to ask how to do everything... Thanks again guys.. This is a awesome forum..Everyone is so helpful

Oh yeah how do I post my Code in the boxes like you guys are? i dont see a option to do it.

 Respond  
turbuiance   -  Dec 07, 2011

@Jethro I got it.. Thanks tho jethro..
How does this look?

on $*:text:/.(?=com\b|net\b|org\b|ca\b|uk\b|tv\b|name\b|ly\b)/iS:#:{
if (%links == 1) {
.kick # $nick 2 | /describe $chan Whoa! $nick $+ , Didn't you read the rules below?? Take this time to read them B)
}
}

on *:text:!Links on:#:{
%links = 1
describe $chan Links are now going to get Timeouts.
}

on *:text:!Links off:#:{
%links = 0
describe $chan Links are now Allowed.
}

 Respond  
turbuiance   -  Dec 07, 2011

@Jethro This is for Justin tv servers.. I wanted a !on and !off script for it... so mods could control too not just through irc...

 Respond  
turbuiance   -  Dec 07, 2011

@Jethro jethro any idea how i would add a On/Off command for this link protection code you helped me with?

on @$*:text:/.(?=com|net|org|ca|uk|tv|name|ly)/iS:#:{
.kick # $nick 2 | /describe $chan Whoa! $nick $+ , Don't Post links in here without permission from a mod.. Cya in 10 mins B)
}

I found a On/Off script but I tried everything and cant seem to get it working properly.. this regex is confusing

 Respond  
turbuiance commented on a Page, On/Off script  -  Dec 07, 2011

would there be a way to add this to !weather script? this is what i have tried but doesnt seem to work...

on *:TEXT:!weather:#: {
  if ($($+(%,weather,#),2) != $false) { code here }
  else { msg $nick Private Msg -> $nick -> I'm silent in # }
}

on $@*:TEXT:/^(!weather on|!weather off)$/S:#: { 
  if ($nick isop #) {
    if ($regml(1) == !weather off) {
      set $+(%,weather,#) $false
      msg # User commands are now off.
      /timer1 1 1 msg # Want to turn them back on? Type !ucmd on
    }
    elseif ($regml(1) == !weather on) && $($+(%,weather,#),2) != $false {
      msg # User Commands are already on.
    }
    else { 
      unset $+(%,weather,#)
      msg # User Commands are now on.      
    }
  }
}

on *:SOCKOPEN:YahooWeather:{
  tokenize 32 $sock($sockname).mark
  if ($sockerr) { $1 $false | halt }

  sockwrite -n $sockname GET /forecastrss?w= $+ $2 $+ $iif($3,&u= $+ $3) HTTP/1.1
  sockwrite -n $sockname Host: weather.yahooapis.com
  sockwrite -n $sockname Connection: Close
  sockwrite -n $sockname $crlf
}

on *:SOCKREAD:YahooWeather:{
  tokenize 32 $sock($sockname).mark
  if ($sockerr) { $1 $false | halt }

  var %read
  sockread %read

  %read = $regsubex(%read,/ +/g,$chr(32))
  if ($regex(%read,/<title>City not found<\/title>/i)) { 
    $1 $false 
    sockclose YahooWeather
    halt 
  }

  if ($regex(%read,/<yweather:(\S+)(.*)\/>/)) {
    var %prefix = $iif($regml(1) == forecast,$iif($hget(Weather,today_day),tomorrow,today),$regml(1))
    noop $regex($regml(2),/\b(.*?)="(.*?)"/g))
    var %num_match = $regml(0)
    while (%num_match) {
      wadd $+(%prefix,_,$regml($calc(%num_match - 1))) $regml(%num_match)
      dec %num_match 2
    }
  }

  elseif ($regex(%read,/<title>(.*?)<\/title>/i)) {
    wadd title $regml(1)
  }
  elseif (%read == </rss>) { 
    $1 $true
    sockclose $sockname
    halt
  }
}

on *:SOCKOPEN:WOEID:{
  tokenize 32 $sock($sockname).mark
  if ($sockerror) { $1 $false | halt }

  sockwrite -n $sockname GET /v1/places.q(' $+ $urlencode($2-) $+ ')?appid= $+ $Y_APPID HTTP/1.1
  sockwrite -n $sockname Host: where.yahooapis.com
  sockwrite -n $sockname Connection: Close
  sockwrite -n $sockname $crlf
}

on *:SOCKREAD:WOEID:{
  tokenize 32 $sock($sockname).mark
  if ($sockerror) { $1 $false | halt }

  var %read
  sockread %read

  If ($regex(%read,/yahoo:total="0"\/>/)) { $1 $false | halt }

  Elseif ($regex(%read,/<woeid>(.*)<\/woeid>/)) { 
    $1 $regml(1) 
    sockclose $sockname
    halt 
  }
}

on *:text:*:*:{
  if ($regex($1-,/^[!.@&]w(?:eather)? (.*)$/i)) {
    if (%weather.flood == 2) {
      msg # Flood Protection Activated.
      inc -u10 %weather.flood 1
    }
    Elseif (%weather.flood > 2) {
      return
    }
    elseif (%weather.channel) {
      msg # Another weather lookup is already in progress, please try again  momentarly
      inc -u5 %weather.flood 1
    }
    Else {
      getWOEID UpdateWeather $regsubex($regml(1),/\b(c(elcius)?|f(arenheit)?)\b/i,)
      set %weather.u $lower($left($regml(1),1))
      set %weather.channel #
      inc -u5 %weather.flood 1
    }
  }
}

alias weatherReplace { return $regsubex($1,/&(\S+?)&/g,$hget(Weather,\1)) }
alias -l wADD { hadd -m Weather $1- }
alias -l Y_APPID { return L8j7ok7V34GTI61wyDk20Uy5PazMYrKUEAHruXNndmOzvkOHgQfVlOz6Az8R9Ib_1A-- }
alias urlEncode { return $regsubex($$1,/([\W\D])/g,$+(%,$base($asc(\t),10,16))) }
alias GetWeather {
  if ($regex($1-,/^\S+ \S+( [fc])?$/i)) {
    if $hget(Weather) { hfree Weather }
    if ($sock(YahooWeather)) { sockclose YahooWeather }
    sockopen YahooWeather weather.yahooapis.com 80
    sockmark YahooWeather $1-
  }
}
alias GetWOEID {
  if ($sock(GetWOEID)) { sockclose GetWOEID }
  if ($2) {
    sockopen WOEID where.yahooapis.com 80
    sockmark WOEID $1-
  }
}
alias UpdateWeather {
  if ($1) {
    getWeather DisplayWeather $1 %weather.u
  }
  else {
    msg %weather.channel Unable to find location, please try again!
    unset %weather.*
  }
}
alias DisplayWeather {
  if ($1) {
    msg %weather.channel $weatherreplace(&title&)
    var %x = Today, High: &today_high&&units_temperature& Low: &today_low&&units_temperature& Cur: &condition_text& &condition_temp&&units_temperature&
    .timer 1 1 msg %weather.channel $weatherreplace(%x)
    var %x = Tomorrow, High: &tomorrow_high&&units_temperature& Low: &tomorrow_low&&units_temperature& &tomorrow_text&
    .timer 1 2 msg %weather.channel $weatherreplace(%x)

  }
  else {
    msg %weather.channel Unable to find weather report, please try a different location.
  }
  unset %weather.*
}
; ############################################
; ## DISPLAY VARIABLES and Examples         ##
; ############################################

/*
&astronomy_sunrise&     = 6:46 am
&astronomy_sunset&      = 6:40 pm
&atmosphere_humidity&   = 54
&atmosphere_pressure&   = 982.05
&atmosphere_rising&     = 0 ;// 0 is steady, 1 is rising, 2 is falling
&atmosphere_visibility& = 16.09
&condition_code&        = 28
&condition_date&        = Wed, 29 Sep 2010 11:53 am PDT ;// Last time weather was update
&condition_temp&        = 27
&condition_text&        = Mostly Cloudy
&location_city&         = Beverly Hills
&location_country&      = United States
&location_region&       = CA
&title&                 = Conditions for Beverly Hills, CA at 11:53 am PDT
&today_code&            = 30
&today_date&            = 29 Sep 2010
&today_day&             = Wed
&today_high&            = 30
&today_low&             = 18
&today_text&            = Partly Cloudy
&tomorrow_code&         = 30
&tomorrow_date&         = 30 Sep 2010
&tomorrow_day&          = Thu
&tomorrow_high&         = 28
&tomorrow_low&          = 18
&tomorrow_text&         = Partly Cloudy
&units_distance&        = km
&units_pressure&        = mb
&units_speed&           = km/h
&units_temperature&     = C
&wind_chill&            = 27
&wind_direction&        = 210 ;// 0-359, 0 is north, 180 is south
&wind_speed&            = 9.66
*/

Thanks guys

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 07, 2011

Can someone Help me on how to Add A On/off to this?

 Respond  
turbuiance commented on a Page, BRB Tracker  -  Dec 05, 2011

how to make this so it triggers if someone writes something like " ok i'll brb going out" .. it doesnt seem to trigger then.. i know the * usually does it but i don't know what i'm doing with regex

Anyone?>?

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

and again the ban function isnt good.. on JTV after 2 bans JTV IP Bans the user and they aernt able to come back into the chat unless they do a IP change.. There isnt a way to do the Kick command with a changing time? Thanks guys

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

ok thanks!

on @$*:text:/.(?=com|net|org|ca|uk|tv|name)/iS:#:{
.kick # $nick 2 | /describe $chan Whoa! $nick $+ , Don't Post links in here without permission from a mod.. Cya in 10 mins B)
}

I had to change a few things for it to display the message in the chat. guess because its on jtv.. Any idea on what the command is for timeouts? not bans. i tried ban -k600? that still seems to ban.. problem with the ban instead of timeout is that after 2 bans even though they are unbanned 10 mins later jtv bans the users IP. the kick code above only does a Timeout i just cant figure out how to pick for how long.

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

hmm and that seems to be banning people.. its on justin dot tv.. the .kick fuction seems to be just giving Timeouts.. I dont want to ban people. also the @ doesnt seem to check if they are a mod. I'm running into this problem alot... some of the snippets on here work great on there others dont work at all or i have to change a few things for them to work.

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

other problem i have ran into is that some people don't put www. in alot of links.. I tried to put .com but it seems to be causing some problems.. had someone banned because the first word of their second sentence was come. they didnt put a space between the period and come and seen it as .com for some reason.. thanks again for the help, greatly appreciated!

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

wow thanks alot jethro and sunny... Appreciate the help.. I'm not trying to be lazy just having some trouble finding how to do certain things.. I have learned a good bit of what i know from your comments on other snippets alone lol.. any good advice for getting further on learning this? Ive basically been just rewriting others code on my own and removing/adding things to see what happens lol, probably not the easiest way of doing things

 Respond  
turbuiance commented on a Page, Kick for posting link  -  Dec 04, 2011

hmm so how would i put a ban for this? im really new to all of this.. havent gotten into regex yet

 Respond  
turbuiance created a Page  -  Dec 04, 2011
1,282 

This is something i put together.. Im sure theres a better way of doing it, Thats why i posted here so you guys could maybe help with that .. THANKS In advance!

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.