save and search nicks

By cofvempire on Jul 04, 2011

ok its my first script with the use of ini, so b kind :)
it saves nicks on join and you can manually add nicks to it.
removal of a nick is included
show nick info that was saved (address and last seen on the channel with time)
search for a nick (then it shows the same info as above)

feel free to comment and to say suggestions, we all need to learn :)

edit:
added join,parts,quits (this goes automatic) so the ini will always change when nicks join, part and so on...
you can still add nicks with the savenick with the text added on ...
tnx to punktured for the help :)

menu * {
  savenicks
  .$iif(!%sv,on,off) savednick: $iif(!%sv,inc,unset) %sv
  .savednicks
  ..savenick: $ohn($$1).1
  ..delnick: $ohn($$1).2
  ..seeinfo: $ohn($$1).3
  ..search: $ohn
}
alias ohn { 
  if ( %sv ) {
    if ($prop = 1) { 
      writeini -n savednick.ini $1 ip $address($1,2) added on $fulldate 
    }
    elseif ($prop = 2) { remini -n savednick.ini $1 }
    elseif ($prop = 3) { echo -a ---> $readini(savednick.ini, $1,ip) <--- }
    elseif ($prop = 4) { 
      var %ohnevent = $iif($event = join,joining $chan, $iif($event = nick,changing nick to $newnick,leaving the server))
      writeini -n savednick.ini $1 ip $address($1,2) last seen %ohnevent on $fulldate 
    }
    else {
      var %nick $$?="searching for who?"
      echo -a ---> $readini(savednick.ini, %nick, ip) <---
    }
  }
}
on *:JOIN:#: { $ohn($nick).4 }
on *:PART:#: { $ohn($nick).4 }
on *:QUIT: { $ohn($nick).4 }

Comments

Sign in to comment.
stop   -  Aug 28, 2011

can u post a screenshot here pls :D

 Respond  
cofvempire   -  Jul 06, 2011

ty

 Respond  
d33j4y   -  Jul 06, 2011

Nice job!!

 Respond  
cofvempire   -  Jul 05, 2011

added a on/of switch to it

 Respond  
cofvempire   -  Jul 05, 2011

its on auto save :) but u can add them manually to :)

 Respond  
stop   -  Jul 05, 2011

why don't you put a when they join in a channels there nicks auto save it.

 Respond  
cofvempire   -  Jul 05, 2011

edited :)

 Respond  
PuNkTuReD   -  Jul 05, 2011

as you have "last seen", a user could join a channel and stay for days on end...
adding a part event and maybe even a quit event, would give a more accurate "last seen" time...

you could also use $prop and use one alias...

this is a quick example, untested...

menu * { 
  savednicks
  .savenick: $ohn($$1).1
  .delnick: $ohn($$1).2
  .seeinfo: $ohn($$1).3
  .search: $ohn
}
alias ohn { 
  if ($prop = 1) { 
    var %ohnevent = $iif($event = join,joining $chan, $iif($event = nick,changing nick to $newnick,leaving the server))
    writeini -n savednick.ini $1 ip $address($1,2) last seen %ohnevent on $fulldate 
  }
  elseif ($prop = 2) { remini -n savednick.ini $1 }
  elseif ($prop = 3) { echo -a ---> $readini(savednick.ini, $1,$address($1,2)) <--- }
  else {
    var %nick $$?="searching for who?"
    echo -a ---> $readini(savednicks.ini, %nick, ip) <---
  }
}
on *:JOIN:#: { $ohn($nick).1 }
on *:PART:#: { $ohn($nick).1 }
on *:QUIT: { $ohn($nick).1 }
 Respond  
cofvempire   -  Jul 04, 2011

Its not only for the nicklist, you can use it on anything.
I know i can put nicklist and channel in the menu :-)
Not all of the aliasses is running from the nicklist.
Ohn4 is to manually search a nick in the ini file so nothing to do with the nicklist
But tnx for the comments :-)

Grtz cofvempire

 Respond  
napa182   -  Jul 04, 2011

um one downfall of using ini for nicks is if you run into a nick like [nick] an so on the ini will not save it right. an yes using menu * is never a good idea. as it can conflict with picwins.
Keep at it....

 Respond  
Burrito   -  Jul 04, 2011

I am referring to the menu incase you did not know that.

 Respond  
blackvenomm666   -  Jul 04, 2011

meh

 Respond  
Burrito   -  Jul 04, 2011

He is running the alias off of a nick in the nicklist.

 Respond  
blackvenomm666   -  Jul 04, 2011

umm burrito that would be a diff way than he has it set up. he's not running it off the nicklist

 Respond  
Burrito   -  Jul 04, 2011

Use menu nicklist and $$1 instead of * and $1. This will make the aliases run only if a nick is selected.

 Respond  
cofvempire   -  Jul 04, 2011

ok saw another bracket wasn't on his place edited that also :)

 Respond  
blackvenomm666   -  Jul 04, 2011

and you got an extra } in your alias ohn4

 Respond  
cofvempire   -  Jul 04, 2011

done :) forgot it was there lol

 Respond  
blackvenomm666   -  Jul 04, 2011

ok your load event is useless you need to get rid of it

 Respond  
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.