MsgtoUser

By Warriorii on Jul 01, 2012

I know this isnt much but i wrote it to use on a friend because i could never catch up with him when he logged into my channel, and i found it very handy for other people i couldnt connect with. I know it is small but i believe it is usefull.. Udate: Some changes have been made so u can keep it loaded after it has been used instead of having to unload it each time. Just go to the channel u want to use this in and right click in your channel window and goto Msg To User then click on add channel. Be sure your in the channel u want to use it in because when you click add channel what ever channel your in thats the one it will add and use. you can add more than one channel also, for the second one just goto it and click add channel. it will automatically turn it's self off once the right user has join the channel and gets the msg. It will also unset the last users name and msg once it is read. Another update: Added a line so you can check and see if u have a msg pending or not. Click on Check Nick And Msg that will make it easier than going into remotes to check it.

#################################
# Written by Jon2 AKA Warriorii #
# Scripted on 7/14/12           #
# Ver 3.0                       #
# Tested by Luvme4me            #
#################################
on 1:load: echo 0,12 You have loaded Jon2's 0,4 Msg To User Script
on 1:unload: { unset %user %mymsg %tm %da %ddd }
menu channel {
  .-
  .Msg To User
  . $iif($group(#myswitch) == on,$style(1) <=- Enabled -=>,Enabled): .enable #myswitch | echo 0,12 Msg To User Script 0,4 Enabled 
  . $iif($group(#myswitch) == off,$style(1) Disabled,<=- Disabled -=>): .disable #myswitch | echo 0,12 Msg To User Script 0,4 Disabled 
  .-
  .Enter nick/message:set %user $$?"Enter users nick ONLY then click OK" | set %tm $time(hh:nn tt) | set %da $date(ddd mm/dd/yyyy) | set %mymsg $$?"Enter User Msg Here" | .enable #myswitch | echo 0,12 Msg To User Script 0,4 Enabled 
  .Check Nick and Msg: if (%user == $null) echo $mtu $+ 9,1  No Message Pending  $+ $mtu | else echo $mtu $+ 9,1 Msg to %user is $+ ... %mymsg | if (%mymsg == $null) { halt } | else echo 0,4 Msg set at 0,12 %tm on %ddd %da  $+ $mtu 
  .Remove Nick and User Msg: unset -s %user %mymsg %tm %da
  .-
  .Send to $$1:send $$1 $script | /say 12Move MsgToUser2.mrc To main mIRC dir | /say 12then type===> 4 /load -rs4 MsgToUser.mrc

  .List Channels: if ($read msguser.txt == $null) echo $mtu $+ 9,1 There Are No Channels Selected  $+ $mtu | ./play -e msguser.txt 
  .Add Channel: {
    if (!$read(msguser.txt , w ,$chan)) {
      write msguser.txt $chan
      echo $mtu $+ 0,12 $chan added to msguser.txt  $+ $mtu
    }
    else echo $mtu $+ 8,1 $chan Is already in msguser.txt  $+ $mtu
  }
  .Del Channel: {
    if ($read(msguser.txt , w ,$chan)) {
      write -ds $+ $chan msguser.txt
      echo $mtu $+ 8,4 $chan Removed from msguser.txt  $+ $mtu
    }
    else echo $mtu $+ 9,1 $chan Is not in msguser.txt  $+ $mtu 
  }
}
alias mtu return 14,5«15,4¤14,5»
#myswitch off
on 1:join:#: {
  if (!$read(msguser.txt , w ,$chan)) { return }
  if (%user isin $nick) { msg %user 1 %mymsg ....4This is an automated message. 0,4 Msg set at 0,12 %ddd %tm on %da }
  .msg $me 12msg has been recieved by %user 0,4 Msg set at 0,12 %ddd %tm on %da 8,1 %user recieved it at %ddd %tm on $date(ddd mm/dd/yyyy) $+ . 
  .msg $me 4MsgToUser has been Shut Off | .disable #myswitch | echo 0,12 Msg To User Script 0,4 Disabled  | .unset -s %user %mymsg %tm %da | echo $chan 9,1 Msg To User Is Now Off  
}
#myswitch end

Comments

Sign in to comment.
Warriorii   -  Aug 04, 2013

I totally updated this just because i needed something to do. :)

 Respond  
alimak96   -  Sep 05, 2012

@MoshMage and @blackvenomm666 ... there are many servers don't have memoserv and the most famous irc server dont have memoserv :P

 Respond  
blackvenomm666   -  Aug 27, 2012

@Mr.MaSTeR the if nick = me is unnecessary just add a ! to the on joon event not only that but with the if ($nick == nickhere) you really don't need the if ($nick == $me) check because unless it is the specified nick in the check it's not going to go off no matter what. as long as all the brackets are placed properly at least lol

 Respond  
Mr.MaSTeR   -  Aug 24, 2012

on *:join:#you channel here: { if ($nick === $me) { halt }
if ($nick == nickhere) { .notice $nick Your message here...4This is an automated message.
}
}

 Respond  
Warriorii   -  Aug 07, 2012

of course theres a memoserv, but how many times has someone sent a memo to someone and that person don't get it because he doesn't look for it. this is much easier to use and plus u can change any mistakes even after your done lol.... I just thought it would be helpful to some.

 Respond  
blackvenomm666   -  Aug 06, 2012

guess they just don't know how to use it lol.

 Respond  
MoshMage   -  Aug 06, 2012

fair enough :)
and yep. i had never seen one either - but this one seems like a home-breed irc network

 Respond  
blackvenomm666   -  Aug 06, 2012

@moshmage i've never been on one lol but still not everyone registers their nick which would also make this small snippet useful eh

 Respond  
MoshMage   -  Aug 06, 2012

@blackvenomm666 You'd be better off saying "There are IRC networks that doon't have any kind of services or memoserv" - i just found this out x)

 Respond  
blackvenomm666   -  Aug 05, 2012

@moshmage not everyone registers their nicknames which would make memoserv useless in that case

 Respond  
MoshMage   -  Aug 05, 2012

There's no /memoserv in your network? that shucks.

 Respond  
blackvenomm666   -  Jul 01, 2012
on *:join:#Your Channel here: {
  if ($nick == nickhere) { .notice $nick Your message here...4This is an automated message. 
}
    .notice $me msg has been recieved by $nick and now the msg will be unloaded.
  .notice $me 4Unloaded MsgToUser.mrc | /unload -rs MsgToUser.mrc
}

Very simple and yes it works in a pinch. i just showed you another way you could do the If statement. With how it is set up you do not need the else halt because if the nick that joins is not the specified nickname it will not activate

Warriorii  -  Feb 10, 2013
how do you get your commit in the black box with numbered lines?
Warriorii  -  Feb 10, 2013
on your comment above now it doesnt unload it just deletes the msg and the nick and turns itself off
blackvenomm666  -  Feb 10, 2013

there is no reasone it would delete you must have done something wrong

Warriorii  -  Feb 24, 2013

no i did nothing wrong i just revised it so that when the user gets the msg it will delete their nick then it will clear all vars then turn itself off. that way u dont have to go into remotes to delete it from your variables...

Warriorii  -  Aug 09, 2013

I took out the else halt Blackvenomm666 and thanks for the advice....

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.