mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
H
hCK
hCK
H
Example:

Code:
<Tammy> !mp
-TammyBot- You have 900 mps left.
<Tammy> !ban LowToys 100 Flooder/Trashtalker
* TammyBot sets mode: +b LowToys!*@*
* LowToys was kicked by TammyBot (Flooder/Trashtalker)
-TammyBot- LowToys is banned in #LowToys. You have 800 mps left.
<Tammy> !mp
-TammyBot- You have 800 mps left.

5
5618
5618
5
You'll have to clarify it a bit.
As it is now, it looks like those "mps" are used up when you ban someone, like ban credit. However, the person doing the banning defines how many points (s)he'll use up at the same time, which seems unlikely.

What exactly is the function of these "mps"?

H
hCK
hCK
H
Originally Posted By: 5618
You'll have to clarify it a bit.
As it is now, it looks like those "mps" are used up when you ban someone, like ban credit. However, the person doing the banning defines how many points (s)he'll use up at the same time, which seems unlikely.

What exactly is the function of these "mps"?


hmmm,,, yes, if you ban someone your mps will decrease, then i nid also !refresh if you dont have "mps" you cannot ban someone or kick someone.

Like this:

Code:
 
<Tammy> !ban LowToys 900 Hacker
* TammyBot sets mode: -ao Tammy
-TammyBot- You have 0 mps left. You cannot the !ban and !kick commands.
<Admin> !refresh Tammy
-TammyBot- Tammy have been refresh.
 


that's all i know frown i nid some help.

V
VictriX
VictriX
V
i'll clarify what hCk was saying.

mps is like a token or credit.
when you ban people, the token will decrease depends on the minute.
lets say, hCk has 900 mps/tokens. and he will perform a ban in his channel.
like: !ban testnick 5 smyle.
then, the bot will decrease 5 in hCk's tokens.
it will become 895.

about the "!refresh" command.
only founder can do it.
and the function of it, is, it returns the person's token to the normal one, which is 900.

5
5618
5618
5
How about this? (currently bans *!*@host)
[EDIT: fixed it so someone won't be able to ban one more time if time exceeds his credit; also fixes a missing bracket]

Please note that this code uses the format: !ban nick [reason] (reason being optional)
It does NOT allow the person who bans to define the amount of "mps" that is subtracted from his total. I do not see what use that would serve, since a person can keep banning with a value of zero (!ban nick 0 reason) and never lose banning privileges.
As it is a person gets 900 points and loses 100 for every ban.

On a side note:
- this won't keep people from getting their &/@/% back
- people can still ban via the IRCd (/mode #channel +b nick) unless you have that blocked
- banning nick!*@* is very very easy to evade. A person just has to change his nick to get back into the channel. Instead of "mode nick!*@*" I'd recommend "*!*@host"


Code:
on *:TEXT:!refresh *:#channel:{
  if (~ isin $nick($chan,$nick).pnick) && ($$2 ison $chan) {
    write -ls $+ $v1 mplist.txt $2 900
    mode $chan +o $2
  }
}
on @*:TEXT:!mp:#channel:{
  if ($read(mplist.txt,s,$nick) >= 0) { .notice $nick You have $v1 mps left. }
} 
on @*:TEXT:!ban *:#channel:{
  if ($$2 ison $chan) && ($$3 isnum) {
    if ($read(mplist.txt,s,$nick) >= $3) {
      ban -ku $+ $calc($3 *60) $2 2 $iif($4,$4-,banned)
      write -ls $+ $nick $nick $calc($v1 - $3)
      if (!$read(mplist.txt,s,$nick)) {
        mode $chan -aoh $nick $nick $nick
        notice $nick You have 0 mps left. You cannot use the !ban and !kick commands anymore.
      }
    }
    else { notice $nick Sorry, you are out of points }
  }
  else { notice $nick Sorry, the format is: !ban nick time reason }
}

Last edited by 5618; 25/12/08 11:33 AM.
H
hCK
hCK
H
Originally Posted By: VictriX
i'll clarify what hCk was saying.

mps is like a token or credit.
when you ban people, the token will decrease depends on the minute.
lets say, hCk has 900 mps/tokens. and he will perform a ban in his channel.
like: !ban testnick 5 smyle.
then, the bot will decrease 5 in hCk's tokens.
it will become 895.

about the "!refresh" command.
only founder can do it.
and the function of it, is, it returns the person's token to the normal one, which is 900.


yah, thanks to you sir victrix,

H
hCK
hCK
H
Originally Posted By: 5618
[Give me a few mins to change this post...]

I've tried to write you something.
Please note that this code uses the format: !ban nick [reason] (reason being optional)
It does NOT allow the person who bans to define the amount of "mps" that is subtracted from his total. I do not see what use that would serve, since a person can keep banning with a value of zero (!ban nick 0 reason) and never lose banning privileges.
As it is a person gets 900 points and loses 100 for every ban.

On a side note:
- this won't keep people from getting their &/@/% back
- people can still ban via the IRCd (/mode #channel +b nick) unless you have that blocked
- banning nick!*@* is very very easy to evade. A person just has to change his nick to get back into the channel. Instead of "mode $chan +b $2 $+ !*@*" I'd recommend "mode $chan +b $address($2,2)"


Code:
on *:TEXT:!refresh *:#channel:{
  if (~ isin $nick($chan,$nick).pnick) && ($$2 ison $chan) { write -ls $+ $v1 mplist.txt $2 900 }
}
on @*:TEXT:!mp:#channel:{
  if ($read(mplist.txt,s,$nick) { .notice $nick You have $v1 mps left. }
} 
on @*:TEXT:!ban *:#channel:{
  if ($$2 ison $chan) && ($read(mplist.txt,s,$nick)) {
    mode $chan +b $2 $+ !*@*
    kick $chan $2 $iif($3,$3-,banned)
    write -ls $+ $nick $nick $calc($v1 -100)
    if (!$read(mplist.txt,s,$nick)) {
      mode $chan -aoh $nick $nick $nick
      notice $nick You have 0 mps left. You cannot use the !ban and !kick commands anymore.
    }
  }
  else { notice $nick Sorry, you are out of points }
}


ahmmm sir, there is an error in !mp
* /if: invalid format (line 53, Kdnk Commands.ini)
i don't how to fixed it
but thanks for your fast reply.

5
5618
5618
5
Was already working on it. See my edited post. ;P

H
hCK
hCK
H
wer is it? smile because if newbie in making script T_T

5
5618
5618
5

H
hCK
hCK
H
smile sir i really confuse T_T
sorry im newbie.

Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
tammy still abusing her users? lol, belived it was closed by now. :P

H
hCK
hCK
H
* /ban: invalid parameters (line 7, Kdnk Commands.ini)
that's only the error sir..
but's its already working thanks for the script.

5
5618
5618
5
Originally Posted By: hCK
* /ban: invalid parameters (line 7, Kdnk Commands.ini)
that's only the error sir..

Sorry, my fault. Change the code to...
Code:
on @*:TEXT:!ban *:#channel:{
  if ($$2 ison $chan) && ($$3 isnum) {
    if ($read(mplist.txt,s,$nick) >= $3) {
      ban -ku $+ $calc($3 *60) $chan $2 2 $iif($4,$4-,banned)
      write -ls $+ $nick $nick $calc($v1 - $3)
      if ($read(mplist.txt,s,$nick) == 0) {
        mode $chan -aoh $nick $nick $nick
        notice $nick You have 0 mps left. You cannot use the !ban and !kick commands anymore.
      }
    }
    else { notice $nick Sorry, you do not have enough points. }
  }
  else { notice $nick Sorry, the format is: !ban nick time reason }
}

H
hCK
hCK
H
sir 5618 why is it when i ban the person for example

Code:
 
<&[TLU]MrKHmER> !chanban mrkhmer 10 test
* KdnkServ sets mode: +b *!*@CE1CCC52.8D258D3B.1CAB6F59.IP
* MrKHmER was kicked by KdnkServ (test)
-MrKHmER- You have 0 mps left. You cannot use the !ban and !kick commands anymore.


why is it 10 only but my mps is 900 its become to 0 again T_T
and when i check my !mp is not decreasing T_T.

Last edited by hCK; 25/12/08 12:42 PM.
5
5618
5618
5
Ok, my apologies again. xD It seems like today is not a good day to write code since I keep making silly mistakes. Here is your working version:
Code:
on *:TEXT:!refresh *:#channel:{
  if (~ isin $nick($chan,$nick).pnick) && ($$2 ison $chan) {
    write -s $+ $v1 mplist.txt $v1 900
    mode $chan +o $2
  }
}
on @*:TEXT:!ban *:#mIRC:{
  if ($$2 ison $chan) && ($$3 isnum) {
    if ($read(mplist.txt,s,$nick) >= $3) {
      write -s $+ $nick mplist.txt $nick $calc($v1 - $3)
      ban -ku $+ $calc($3 *60) $chan $2 2 $iif($4,$4-,banned)
      if ($read(mplist.txt,s,$nick) == 0) {
        mode $chan -aoh $nick $nick $nick
        notice $nick You have 0 mps left. You cannot use the !ban and !kick commands anymore.
      }
    }
    else { notice $nick Sorry, you do not have enough points. }
  }
  else { notice $nick Sorry, the format is: !ban nick time reason }
}

H
hCK
hCK
H
sir it's always
<&[TLU]MrKHmER> !ban MrKHmER 10 Flooder
-KdnkServ- Sorry, the format is: !ban nick time reason

5
5618
5618
5
Then MrKHmER must not be in the channel?
Because it works on my side.

H
hCK
hCK
H
its already working,
thanks sir
merry xmas
thank you so much

H
hCK
hCK
H
sir last question.,,
why is it the nick will !refresh his/her own

Code:
 
on *:TEXT:!refresh*:#test:{
  if (~ isin $nick($chan,$nick).pnick) && ($$2 ison $chan) {
    $read(mplist.txt,s,$v1)
    write -l $+ $readn mplist.txt $v1 900
    mode $chan +ao $2
  }
}


the if (~ isin $nick($chan,$nick).pnick && ($$2 ison $chan) {
why is not the Admin can do the refresh
like this:

<&[TLU]MrKHmER> !chanban Kults 889 Hacker
* KdnkServ sets mode: +b *!*@CE1CCC52.8D258D3B.1CAB6F59.IP
* Kults was kicked by KdnkServ (Hacker)
* KdnkServ sets mode: -ao [TLU]MrKHmER [TLU]MrKHmER
* Retrieving #test modes...
* KdnkServ sets mode: -b *!*@CE1CCC52.8D258D3B.1CAB6F59.IP
<[TLU]MrKHmER> !mp
<[TLU]MrKHmER> !refresh
<~KdnkServ> !refresh [tlu]mrkhmer
<~KdnkServ> !refresh [tlu]mrkhmer
* KdnkServ sets mode: +q [TLU]MrKHmER
<~[TLU]MrKHmER> !refresh
<~[TLU]MrKHmER> !refresh [tlu]mrkhmer
* KdnkServ sets mode: +a [TLU]MrKHmER
* KdnkServ sets mode: -a [TLU]MrKHmER
* KdnkServ sets mode: +a [TLU]MrKHmER
* KdnkServ sets mode: -q [TLU]MrKHmER
<&[TLU]MrKHmER> !mp

i set first [TLU]Mrkhmer as a owner because i can't refresh him,
how to change if (~ isin $nick($chan

thanks sir

Page 1 of 2 1 2

Link Copied to Clipboard