resync
Posted by DarkJFMan
Monday, July 25, 2005
Description: your own .resync script if you have your own userlist (seperate from ChanServ)

on *:JOIN:#yourchan: {
  if ($ulevel > 200) {
    write op.txt $nick
  }
  elseif ($ulevel == 100) {
    write voice.txt $nick
  }
}

on *:NICK: {
  if ($ulevel > 200) {
    write -ds $+ $nick op.txt
    write $newnick op.txt
  }
  elseif ($ulevel == 100) {
    write -ds $+ $nick voice.txt
    write $newnick voice.txt
  }
}

on *:PART:#yourchan: {
  if ($ulevel > 200) {
    write -ds $+ $nick op.txt
  }
  elseif ($ulevel == 100) {
    write -ds $+ $nick voice.txt
  }
}

on 200:TEXT:.resync:#yourchan: {
  var %i = 1
  while ($read(op.txt,%i)) {
    mode $chan +o $ifmatch
    inc %i
  }
  var %m = 1
  while ($read(voice.txt,%m)) {
    mode $chan +v $ifmatch
    inc %m
  }
}
One more thing...
Posted by DarkJFMan
Monday, July 25, 2005 02:14am PDT
I didn't add the part where it devoice/deop someone who isn't in the user list, I will do it later, I don't have much time right now

EDIT: Try this...

  var %o = 1
  while (%o <= $nick($chan,%o) {
    if ($nick isop $chan) && ($ulevel < 200) {
      mode $chan -ov $nick $nick
      inc %o
    }
  }
  var %v = 1
  while (%v <= $nick($chan,%v) {
    if ($nick isvoice $chan) && ($ulevel < 100) {
      mode $chan -v $nick
      inc %v
    }
  }

Maybe someone can test it and tell me if it's wrong, I didn't have time. Starting a new job today.

I was also being told the original script isn't working... well of course it won't if you don't add "write $2 op.txt/voice.txt" in your .adduser text trigger.
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world