(Notice)

By whereisthezebra? on Feb 05, 2010

This is my first submission. Text wrapped in ( and ) will be noticed to all selected nicks in the nicklist.

Example: (Hello.) -> -zebra- Hello.

on *:INPUT:#: {
  if ($left($1-,1) == $chr(40) && $right($1-,1) == $chr(41) && $snick($active,0) > 0) {
    var %a = 1
    while (%a <= $snick($active,0)) {
      notice $snick($active,%a) $mid($1-,2,$calc($len($1-) - 2))
      inc %a
    }
    haltdef
  }
}

Comments

Sign in to comment.
Souljaa   -  Feb 10, 2010

ROFL @ blodix

More
 Respond  
blodix   -  Feb 07, 2010

And there you can do as following simply type: /notice #channel

More
 Respond  
whereisthezebra?   -  Feb 07, 2010

Thanks for the comments.

More
 Respond  
Jethro   -  Feb 05, 2010

Thanks for sharing. It sure takes less work to send a notice than write one enclosed with parenthesis. Thanks for the heads up on the haltdef.

More
 Respond  
gooshie   -  Feb 05, 2010

Too much work wrapping your (message). For years I used what I called my double slash whisper. But now I made it into an alias and enabled the second editbox and use it to notice whisper.

on *:INPUT:#:if $1 = // && !$ctrlenter && !$inpaste { haltdef | notice $$snicks $$2- }

Note that you best haltdef before you notice so your private convo dont go to channel if you have no $$snicks.

More
 Respond  
sunslayer   -  Feb 05, 2010

Yes, but you still missed the /notice command.../fp

More
 Respond  
Jethro   -  Feb 05, 2010

Perhaps no loops needed after all:

on *:INPUT:#: {
  if (/* !iswm $1) && (!$ctrlenter) && (!$inpaste) {
    if ($regex($1-,/[(](.+)[)]/iS)) notice $snicks $regml(1) | haltdef
  }
}

yes my mistake the asterisk in the regex should've been + instead.

More
 Respond  
Jethro   -  Feb 05, 2010

sunslayer, I think you missed something in your example:

on *:INPUT:#: {
  if ($regex($1-,/^\50(.+)\51$/)) { 
    var %a $regml(1) | tokenize 44 $regsubex($str(.,$snick(#,0)),/(.)/g,$&
      $+($snick(#,\n),$iif(\n != \0,$chr(44)))) | notice $* %a | haltdef
  }
}

I'm not sure about: /notice snick1,snick2,snick3 <- For me, at least for the network I use, it doesn't support multiple notices with a comma.

But I know some do support that, so it's doable with:

on *:INPUT:#: {
  if ($regex($1-,/^\50(.+)\51$/)) { 
    var %a $regml(1) | notice $regsubex($str(.,$snick(#,0)),/(.)/g,$+($snick(#,\n),$iif(\n != \0,$chr(44)))) %a | haltdef
  }
}

Yes, but you still missed the /notice command...

P.S. It may even be doable with the $snicks identifier.

More
 Respond  
sunslayer   -  Feb 05, 2010

im not sure how many IRCD's support this method but i know UnReal does, you dont need to use a while loop to parse $snick

on *:INPUT:#: {
  if ($regex($1-,/^\50(.+)\51$/) && $snick(#,0) && !$ctrlenter) {
    var %a = $regml(1)
    .notice $regsubex($str(.,$snick(#,0)),/(.)/g,$+($snick(#,\n),$iif(\n != \0,$chr(44)))) %a
    haltdef
  }
}
More
 Respond  
Jethro   -  Feb 05, 2010

You can do it as such:

on *:input:#:$nall($1-)
alias nall { if ($regex($1-,/[(](.*)[)]/iS)) {
    var %a 1 | while ($snick($active,%a)) { 
  .timer 1 $calc(%a * 2) notice $v1 $regml(1) | inc %a } }
}

Either enter: /nall (notice) or: (notice) But I think it's best to just make this into an alias.

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