[Solved] Pm on !code

Paste Your code(s) here, and state your problem.

[Solved] Pm on !code

Postby Fedtmule » Sat Jun 07, 2008 11:58 am

Hello gain. Let my try explain what i need.

When a user connect and type !code my Mirc client sent a pm to the user (not only notice but pm) with a message i choose ex. Your code is **** Even if i´m afk mode or not.
Fedtmule
 

Re: Pm on !code

Postby Cristian » Sat Jun 07, 2008 12:30 pm

When a user type !code, s/he will get a message, that looks like this: Your message here.
Change the 'message' in the alias(message) below.

I hope this helps you.

Code: Select all
alias -l message { return Your message here. }
on *:TEXT:!code:#: {
  if ($nick ison $chan) {
    if (!%flood. [ $+ [ $address ] ]) {
      .set -u60 %flood. [ $+ [ $address ] ] 1
      .msg $nick $message
    }
  }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Pm on !code

Postby Fedtmule » Sat Jun 07, 2008 12:39 pm

Sumsar wrote:When a user type !code, s/he will get a message, that looks like this: Your message here.
Change the 'message' in the alias(message) below.

I hope this helps you.

Code: Select all
alias -l message { return Your message here. }
on *:TEXT:!code:#: {
  if ($nick ison $chan) {
    if (!%flood. [ $+ [ $address ] ]) {
      .set -u60 %flood. [ $+ [ $address ] ] 1
      .msg $nick $message
    }
  }
}


Where to add the code :)
Fedtmule
 

Re: Pm on !code

Postby Hansa » Sat Jun 07, 2008 12:49 pm

Code: Select all
alias -l message { return Your message here. }

Your message here. change that to your code...
Hansa
 

Re: Pm on !code

Postby Cristian » Sat Jun 07, 2008 12:50 pm

Change the highlighted text.

alias -l message { return Your message here. }
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Pm on !code

Postby Fedtmule » Sat Jun 07, 2008 1:03 pm

Sumsar wrote:Change the highlighted text.

alias -l message { return Your message here. }


Thanks :D works great
Fedtmule
 

Re: Pm on !code

Postby Lukemob » Sat Jun 07, 2008 7:22 pm

Nice Sumsar, just a little notice...

Code: Select all
on *:TEXT:!code:#: { //defines text event on channel
  if ($nick ison $chan) { //this is already defined in the firsrt line and its expected the nick won't part - even if nick would, I think he'd want to send code too :-)


Anyway, nice work mate.
Lukemob
 

Re: Pm on !code

Postby Cristian » Sat Jun 07, 2008 7:43 pm

True, but if channel mode +n isn't set, a user from outside the channel could cause problems.

So its just to be sure ;)
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Pm on !code

Postby Lukemob » Sun Jun 08, 2008 12:50 pm

Not sure if on text event like this also checks a messages from outside.

Anyways, be sure is the best. :-)
Lukemob
 

Re: Pm on !code

Postby PuNkTuReD » Wed Jan 07, 2009 9:44 pm

sumsar is correct
if a channel does NOT have mode +n set
the bots commands may be triggered from outside of the channel
PuNkTuReD
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron