mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2013
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2013
Posts: 19
So i have made a IRC bot to work with a website that i live stream on.
Twitch TV

Anyhow moving on the reason why i am here is because whenever i put my bot in my stream or someone else's stream i have to activate the commands inside chat than they start doing it, and i wanted to know if i could make it so when the bot joins they automatically start for example.


this is one of my scripts.
Quote:
on *:TEXT:!txton:#:{
if ($nick isop #) {
.timerLinks 0 3600 msg # $!read(textone.txt,n)
}
}

on *:TEXT:!txtoff:#: {
if ($nick isop #) {
.timerLinks off
}
}


If i changed it too like
Quote:
on *:join:#:{
if ($nick isop #) {
.timerLinks 0 3600 msg # $!read(textone.txt,n)
}
}


Would that fix it for me? or am i doing something wrong

Last edited by Dunsparth; 07/02/14 06:02 AM.
Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55
Hello


How about this?


Change the BOT NICK to your bot nick and #CHANNEL to the channel bot is connecting.


Code:

on *:join:#: {
  if ($nick == BOT NICK) && ($chan == #CHANNEL) {
    .timerLinks 0 3600 .msg $chan $!read(textone.txt,n)
  }
}
on *:part:#: {
  if ($nick == BOT NICK) && ($chan == #CHANNEL) {
    .timerLinks off
  }
}
on *:quit: {
  if ($nick == BOTNICK) {
    .timerLinks off
  }
}



Let me know how it goes.

laugh



Regards

JayStew
Joined: Nov 2013
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2013
Posts: 19
That worked ! thank you so much.
Now to get my other two scripts that i really would like to do that same thing working.. :P I am going to try, but will probably fail, if you would be kind enough to help.

Quote:
on *:TEXT:*:#:{

if ($me isop $chan) {
if ($nick !isop $chan) {
if (%capskick == on) && ($len($1-) > 5) {
set %caps.percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
if (%caps.percent > %caps.allowed) {
inc %kick
;kick $chan $nick $round(%caps.percent,0) $+ % CAPS! 4[ $+ %kick $+ ]
msg $chan $nick $+! , Stop typing in caps lock it's annoying.
msg $chan .timeout $nick 60
}
}
}
}
if ($1 == !capskick) {
if ($nick isop $chan) {
if ($2 == on) { set %capskick on | msg $chan Capskick is on }
if ($2 == off) { set %capskick off | msg $chan Capskick is off }
if ($2 == set) { set %caps.allowed $3 | msg $chan Caps allowed set to %caps.allowed $+ % }
}
}
}


_____________________________________________________


on @*:TEXT:*:#:{
if ($nick !isop # && %capskick && $len($1-) > 5) {
var %caps.percent $calc($regex($1-,/[A-Z]/Sg)/$len($1-)*100)
if (%caps.percent > %caps.allowed) {
inc %kick
ban -ku600 # $nick 2 $round(%caps.percent,0) $+ % CAPS! 4[ $+ %kick $+ ]
.msg $nick Stop typing in caps lock it's very annoying ! }
}
if ($regex($1-,/^!!capskick\s(o(n|ff)?|set)?\s?(\d+)?/iS) && $nick isop #) {
if ($istok(on off,$regml(1),32)) {
$+($iif($regml(1) = off,un),set) %capskick on
msg # Capskick is  $iif(%capskick,on,off) 
}
if ($regml(1) = set && $regml(2)) {
set %caps.allowed $v1
msg # Caps allowed set to $v1 $+ %
}
}
}


Quote:
on @*:text:*:#:linkpost $1-
on @*:action:*:#:linkpost $1-
on @*:notice:*:#:linkpost $1-
alias -l linkpost {
if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
var %purge /^!(link\so(n|ff)|(permit))\b/iS
var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|tv|ru
var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
timeout # $nick | /mode # -b $nick
msg # $nick You did not have permission to post a link ask a mod to !permit you
msg # /timeout $nick 60
}
elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
hadd -mz permit $v1 60 | notice $v1 You have 60 seconds to post a link. Starting now!
msg # You now have 60 seconds to post a link!

}
elseif (($regml(1) = link on) && ($nick isop #)) {
goto $iif(!$istok(%chanon1,#,32),a,b) | :a | set %chanon1 $addtok(%chanon,#,32)
.msg # My Link Protection Is Now on in: $+($chr(2),#)
halt | :b | .msg # $nick $+ , my link protection is already on in $&
$+($chr(2),#,$chr(2)) !
}
elseif (($regml(1) = link off) && ($nick isop #)) {
goto $iif($istok(%chanon1,#,32),c,d) | :c | set %chanon1 $remtok(%chanon,#,1,32)
.msg # My Link Protection Is Now off in: $+($chr(2),#)
halt | laugh | .msg # $nick $+ , My link protection is already off . $&
!
}
}
}




Link Copied to Clipboard