Need IRC help generating a list

By Kirotos on Aug 11, 2015

I need help with my irc script, I can get everything to work, but the text !del and !listreset does not work. I've spent countless hours trying to fix it thinking its an error on my part like a missed bracket etc with no luck.

Any help would be appreciated as it is driving me crazy getting this to work.

on *:text:hi:#: { msg $chan Welcome $nick hope you enjoy the show! For commands info type !commands }
on *:text:what are kuros?:#:{ msg $chan Thanks for asking $nick Kuros are used for giveaways and betting on outcomes of matches etc, more things in the future! You earn 1 kuro every 10 minutes while stream is live and logged in to the chat! --- To see how many you have type !kuros }

on *:text:!join:#: { 
  if ($read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,nw,$nick)) { msg $chan $nick is already in the list. | return }
  else write C:\Users\Chris\Desktop\Kirobot_\smash4list.txt $nick 
  msg $chan Added $nick to the list
}

on *:text:!del *:#: { 
  if ($nick isop #) {
    if (!$read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,nw,$2)) { msg $chan $2 is not in the list. | return }
    elseif ($read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,nw,$2)) { msg $chan deleted $2 from the list. 
    write -dl $+ $readn (C:\Users\Chris\Desktop\Kirobot_\smash4list.txt) }
  }
}

on *:text:!list:#: { 
  var %t1 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,1) 
  var %t2 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,2)
  var %t3 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,3) 
  var %t4 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,4) 
  var %t5 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,5)
  var %t6 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,6)
  var %t7 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,7)
  var %t8 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,8)
  var %t9 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,9)
  var %t10 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,10)
  var %t11 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,11)
  var %t12 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,12)
  var %t13 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,13)
  var %t14 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,14)
  var %t15 $read(C:\Users\Chris\Desktop\Kirobot_\smash4list.txt,15) 
msg $chan %t1 %t2 %t3 %t4 %t5 %t6 %t7 %t8 %t9 %t10 %t11 %t12 %t13 %t14 %t15 }
}

on *:text:!listreset:#: {
if ($nick isop #) { write -c C:\Users\Chris\Desktop\Kirobot_\smash4list.txt
msg $chan list reset. }
}

Comments

Sign in to comment.
Charlatan   -  Aug 15, 2015

Im sleepy, check the line 13 you need to close with a bracket at the end and the line 14 $readn and 34 you has to erase one of the brackets

Kirotos  -  Sep 09, 2015

I'm confused, I can you explain a little further? I tried removing the brackets and adding brackets and it did not help :/

Sign in to comment

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.