Those are colour codes that seem to have dissapeared. Maybe a channel mode or something. Try this colour-free version:
on $*:text:/^!calc /Si:#,?:{
calculate $2-
}
alias calculate {
if $sock(calculate) || $sock($+(calculate,$nick)) {
sockclose $v1
}
sockopen $iif($event == text,$+(calculate,$nick),calculate) www.google.com 80
sockmark $iif($event == text,$+(calculate,$nick) msg $iif(#,#,$nick),calculate echo -a) $1-
}
on *:sockopen:calculate*:{
tokenize 32 $sock($sockname).mark
sockwrite -nt $sockname GET $+(/ig/calculator?hl=en&q=,$urlencode($3-)) HTTP/1.1
sockwrite -nt $sockname Host: www.google.com
sockwrite -nt $sockname Connection: close
sockwrite -nt $sockname $crlf
}
on *:sockread:calculate*:{
sockread &greader
var %greader $bvar(&greader,1-).text
tokenize 32 $sock($sockname).mark
if $regex(answer $+ $2,%greader,/rhs: "(.*?)"/) && $regex(calc $+ $2,%greader,/lhs: "(.*?)"/) {
$1-2 $iif($regml(answer $+ $2,1) == $null,Something is wrong with the calculation!,$&
$+ $csub($cchr($sup($regml(calc $+ $2,1) = $v1))))
sockclose $sockname
}
}
alias cchr return $regsubex($1,/\\x26#(\d+?);/g,$chr(\1))
alias sup return $regsubex($1,/\\x3csup\\x3e([\d-]+?)\\x3c\/sup\\x3e/Sg,^\1)
alias urlencode return $regsubex($1,/(\W)/g,% $+ $base($asc(\1),10,16,2)))
alias csub return $regsubex($1,/\\x3csub\\x3e(.+?)\\x3c\/sub\\x3e/g,\1)
Here you go (radio button request)
dialog Stamps {
title "Timestamp change"
size -1 -1 266 84
option pixels notheme
box "", 1, 2 -4 261 85
button "ok", 9, 194 57 65 20, ok
box "", 10, 190 44 72 37
button "green", 12, 11 9 52 20
button "red", 13, 11 33 52 20
button "blue", 14, 11 57 52 20
box "", 16, 4 -4 65 85
radio "off", 8, 193 36 68 15
box "", 11, 67 -4 125 85
text "Timestamps will be changed!!!", 15, 70 6 117 52, disable center
button "reset", 17, 97 58 65 20
box "", 18, 93 47 74 32
text "timestamp:", 20, 193 4 66 14, disable
radio "on", 19, 193 21 68 15
}
on 1:dialog:Stamps:init:0: {
did -c Stamps $iif(%tstamp,19,8)
}
on 1:DIALOG:Stamps:sclick:*:{
if ($did == 12) { green }
if ($did == 13) { red }
if ($did == 14) { blue }
if ($Did == 19) { timestamp on | echo $active 4Time is on !!! | set %tstamp on }
if ($did == 8) { timestamp off | echo $active 4Time is off !!! | unset %tstamp }
if ($did == 17) { unsetT }
}
alias blue {
timestamp -f 10(11HH10:11nn10:11ss10)
set %tsamp on
echo $active 10Timestamp blue loadet: 10(11HH10:11nn10:11ss10)
}
alias green {
timestamp -f 3(9HH3:9nn3:9ss3)
set %tstamp on
echo $active 9Timestamp green loadet: 3(9HH3:9nn3:9ss3)
}
alias red {
timestamp -f 5(4HH5:4nn5:4ss5)
set %tstamp on
echo $active 4Timestamp red loadet: 5(4HH5:4nn5:4ss5)
}
alias unsetT {
timestamp -f hh:nn:ss
echo $active Timestamp reset hh:nn:ss
}
This is my version of a Google Calculator. It can do more than a regular calculator, such as calculating measures, converting etc. A few examples are coming. The commands are either > !calc -calculation here- or /calculate -calculation here- Use !calc in a channel, and it will message you there. In pm and it will respond you there. /calculate simply echos it to your active window. If you find any..