Originally Posted By: Nillen
An extension to this, owners are always the same $nick as the #channel name on twitch. Example (nillens and #nillens) So for my own script where I use userlevels I have a check for
Code:
$nick == $mid(#,2)
and from an ini file.

But what I believe Majeye was looking for was a simple if statement like:
Code:
if ($nick != username) return
and I suggest you read the help files regarding these matters.
/help if then else
/help $nick
etc


That is exactly what I was seeking.

Unfortunately i'm still having difficulty getting it to work properly.. mind looking over the following code and pointing out where I went wrong?

Code:
on $*:text:/!karma (add|remove)/Si:#thebluemuzzy:{
  if ( $nick == thebluemuzzy ) { return } {
    if ($0 < 3) { msg # Insufficient parameters: Use !karma <add|remove> <user> [number] | return }
    writeini -n Karma.ini $+(#,.,$3) Points $calc($readini(Karma.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
    { msg $chan $3 now has $readini(Karma.ini,$+(#,.,$3),Points) total karma. }
  }
  else { msg $chan This command is only available to TheBlueMuzzy. }
}


Nevermind.. fixed it myself with:

Code:
on $*:text:/!karma (add|remove)/Si:#thebluemuzzy:{
  if ( $nick == thebluemuzzy ) { 
    if ($0 < 3) { msg # Insufficient parameters: Use !karma <add|remove> <user> [number] | return }
    writeini -n Karma.ini $+(#,.,$3) Points $calc($readini(Karma.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
    { msg $chan $3 now has $readini(Karma.ini,$+(#,.,$3),Points) total karma. }
  }
  else { msg $chan This command is only available to TheBlueMuzzy. }
}

Last edited by Majeye; 14/10/14 10:31 PM.