Nick Completor

By Degausser on Nov 13, 2016

A simple but powerful nickname completor, to make sure someone acknowledges your message.

Image

on 1:input:#:{
  if ($left($1,1) != /) && ($right($1,1) == :) {
    var %x = 1 , %c = $nick($chan, 0) , %search = $+(*,$left($1, -1),*), %nick
    while (%x <= %c) {
      if (%search iswm $nick($chan, %x)) {
        %nick = $nick($chan, %x) $+ :
        break
      }
      inc %x
    }
    if (!%nick) {
      echo -a No suck nickname in this channel
      haltdef
    }
    else {
      var %l = $len(%nick), %x = $rand(2, $calc(%l - 1))
      if (%l == 2) { %nick = $+(07,$left(%nick, 1),) $+ $+(10,$right(%nick, 1),) }
      else { %nick = $+(07,$left(%nick, $calc(%x - 1)),) $+ $+(06,$mid(%nick, %x, 1),) $+ $+(10,$mid(%nick, $calc(%x + 1)),) }
      say %nick $2-
      haltdef
    }
  }
}

Comments

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.