mIRC Home    About    Download    Register    News    Help

Print Thread
#181767 30/07/07 08:20 PM
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
MY friend and I have been working on a bot for our channel. We have gotten many usefull tips and scripts from here. However, we need help in making a temporary kick ban script. WE have one already but only works in alias. We need one that works in remote. Here is the script:

/tkb { /timer 1 0 /mode #lost_inferno +bb $address($1,2) $address($1,3)
/timer 1 1 /kick # $1 7,1 Time-Kick-Ban. 8,1::11,1 Reason:  $+ $3- $+  8,1::4,1 Banned for: $2 minute(s) - $calc(60*$2) second(s) 8,1::10,1 Ban'n'Kicks: %Counter.Ban.Kicks $+ 1.
/timer 1 $calc(60*$2) /mode #lost_inferno -bb $address($1,2) $address($1,3)
}

Basically we would like everything to stay the same just if it could please be activated by ! instead of / and also if only people with access lvls of 4 and up could use it. I have been working quite hard to figure it out but sadly can't seem to. I hope someone on here can help me out.

Thanks a lot!

laugh

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Of course, what you've been making are aliases, which, well, it seems that for a bot, are pretty unnecessary, since bots should be run on remotes (unless they're not really bots but humans typing the aliases).

For the 1st timer, replace timer 1 0 with timer 1 1.

For the 2nd timer, plug in #lost_inferno for #, so the timer knows what channel to kick.

And for the 3rd timer, use $calc(60 * $2) rather than $calc(60*$2).

Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
It doesnt seem to be working. From what I have seen and learned the code needs to start off with something like On *:TEXT:!TKB...
I think thats what would go in the remote section. I just am not sure with what follows. Also I need the script to be activated with a ! command not a /.

Any further suggestions?

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Of course, you pasted to me alias, and I helped you in alias, and it seems when you're saying it isn't working, that the remotes aren't working.

The way your alias I helped you with is this: /tkb <NickToKick> <BanDuratonInMinutes>.

That means you type that.

Note that on text event works when someone else messages a text, not what you type. What you type is on input.

Of course, there is no reason to make your commands start off with a ! and not a /.

I have an alias for /kick, it's /k, not !kick or !k. Consequently, I use /b for /ban and not !ban or !b for /ban.

Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Well the reason I wanted to be activated through a remote was because right now I am the only one that can use the command. The idea in putting it in remote is so others with sufficent access an use the command. The code you gave me works perfectly in Alias. Thank you very much. I am just wondering if there is a way to make it so others can use it. Thats why I want the command to start with !. because / limits it to the person "on" the bot.

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
That's actually quite simple. Share your alias with the other ops so they can use it too!

Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
Originally Posted By: LostShadow
... Share your alias with the other ops so they can use it too!

If you'd prefer more control over just who uses it, you can 'convert' your aliases
to ON TEXT commands by putting the following in your Remotes.
I included a check for whether the person typing has ops.

I put that $& in mostly because I can't stand scrolling in this forum wink

Code:
on 4:TEXT:!tkb *:#lost_inferno: {
  if ( $nick isop $chan ) {
    timer 1 0 /mode #lost_inferno +bb $address($1,2) $address($1,3)
    timer 1 1 /kick # $1 7,1 Time-Kick-Ban. 8,1::11,1 Reason:  $+ $3- $+  8,1::4,1 $&
      Banned for: $2 minute(s) - $calc(60 * $2) second(s) 8,1::10,1 $&
        Ban'n'Kicks: %Counter.Ban.Kicks $+ 1.
    timer 1 $calc(60 * $2) /mode #lost_inferno -bb $address($1,2) $address($1,3)
  }
  else notice $nick You are not opped in $chan
}


hth


LonDart
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Originally Posted By: LonDart

Code:
on 4:TEXT:!tkb *:#lost_inferno: {
  if ( $nick isop $chan ) {
    timer 1 0 /mode #lost_inferno +bb $address($1,2) $address($1,3)
    timer 1 1 /kick # $1 7,1 Time-Kick-Ban. 8,1::11,1 Reason:  $+ $3- $+  8,1::4,1 $&
      Banned for: $2 minute(s) - $calc(60 * $2) second(s) 8,1::10,1 $&
        Ban'n'Kicks: %Counter.Ban.Kicks $+ 1.
    timer 1 $calc(60 * $2) /mode #lost_inferno -bb $address($1,2) $address($1,3)
  }
  else notice $nick You are not opped in $chan
}


Usage?? : !tkb <nick> <duration> <reason>
error : $1 = !tkb , $2 = <nick> , $3 = <duration> , $4- = reason

Correct code:
Code:
on @4:TEXT:!tkb *:#lost_inferno: {
  if ( $nick isop $chan ) {
    .timerban 1 0 mode #lost_inferno +bb $address($2,2) $address($2,3)
    .timerkick 1 1 kick # $2 7,1 Time-Kick-Ban. 8,1::11,1 Reason:  $+ $4- $+  8,1::4,1 $&
      Banned for: $3 minute(s) - $calc(60 * $3) second(s) 8,1::10,1 $&
      Ban'n'Kicks: $iif(%Counter.Ban.Kicks == $null,0,%Counter.Ban.Kicks)
    .timerunbun 1 $calc(60 * $3) mode #lost_inferno -bb $address($2,2) $address($2,3)
    inc %Counter.Ban.Kicks
  }
  else notice $nick You are not opped in $chan $+ .
}

Last edited by Crinul; 31/07/07 06:39 PM.
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Thanks so much.
That is exactly what I wanted.
However i need a little more help.
I assumed the bout would recegnize the access level presets of the channel. Apperently it cant. So how do I set the access?
I know you need to put a code into users but what exactly do you put?

Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Originally Posted By: zad0909
So how do I set the access?

/auser 4 <nick>


/help /auser

/help /guser (This works the same as the /auser command except that it looks up address of the specified nick and adds it to the user list.)

/help /ruser (This removes the specified user from the user list.)

Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Thanks so much, that worked laugh

However as i am adding more script it seems some it will just stop working. Usually moving it around will fix it but it appears that isnt working either.

Am I doing something wrong?

Also I need help on anther script.
We want to make an !event type of script.
The idea is you type !setevent [info and event name here]
Then som1 could type !even and it would say what the other person had inputed.

Thanks for the continued help laugh

Last edited by zad0909; 01/08/07 07:16 PM.
Joined: Mar 2022
Posts: 15
Pikka bird
Offline
Pikka bird
Joined: Mar 2022
Posts: 15

great script.

how to write it if you want a
- perm ban
- unban before the timer kicks in

thanks!


Originally Posted by Crinul
Originally Posted by zad0909
So how do I set the access?

/auser 4 <nick>


/help /auser

/help /guser (This works the same as the /auser command except that it looks up address of the specified nick and adds it to the user list.)

/help /ruser (This removes the specified user from the user list.)


JilValentine | (Read error: EOF from client) | https://jilvalentine.de
Joined: Nov 2021
Posts: 91
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 91
depending on network there are some timed ban settings optional with anope or ircd again depending on network you run this


Link Copied to Clipboard