mIRC Home    About    Download    Register    News    Help

Print Thread
#207533 21/12/08 02:14 PM
Joined: Nov 2008
Posts: 17
V
VictriX Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Nov 2008
Posts: 17
hi there..
i just want to request for a !infoban command.

in my channel i have !ban <name> <minutes> <reason>

when i ban a person in my channel and i type !infoban <nickname> , the bot will notice me like the following

----------Ban Information----------
Username : <the name of the person i ban>
From Channel : <the channel where i banned a person>
Issued By : <the person who perform ban>
Reason : <the reason why the person's got banned>
Issued : <the exact time that i ban a person>
Expires : <the time that the ban expires>
----------Ban Information----------

i hope you will do my simple snippet request.
thanks!

example.
Code:
<kurachi> !ban testnick 3 you're a flooder.
* Bot sets mode: +b testnick!*@*
* ^MrJeRiCcCc was kicked by Bot (testnick Has Been Banned By kurachi [Reason: test bro.])
<kurachi> !infoban testnick
-Bot- ----------Ban Information----------
-Bot- Username : testnick
-Bot- From Channel : #kurachi
-Bot- Issued By : kurachi
-Bot- Reason : you're a flooder
-Bot- Issued : Mon May 4, 2008 5:00 PM
-Bot- Expires : Mon May 4, 2008 5:03 PM
-Bot- ----------Ban Information---------- 


thank you.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
I don't know if you run the !ban script too, but you'll have to combine the first on TEXT even with that one, if you do.

If you don't, you may have to add code if you don't want everyone to be able to use !infoban.

If you don't like the current date output (example: Sun Dec 21 15:27:38 2008), that can be changed.

Code:
on *:TEXT:!ban *:#channel:{
  if ($$2 ison $chan) && ($$3 isnum) && ($$4) {
    write bans.txt $2 $chan $nick $ctime $3 $4-
  }
}
on *:TEXT:!infoban *:#channel:{
  if ($read(bans.txt,s,$$2)) {
    .notice $nick ----------Ban Information----------
    .notice $nick Username : $2
    .notice $nick From Channel : $gettok($v1,1,32)
    .notice $nick Issued By : $gettok($v1,2,32)
    .notice $nick Reason : $gettok($v1,5-,32)
    .notice $nick Issued : $asctime($gettok($v1,3,32))
    .notice $nick Expires : $asctime($calc($gettok($v1,3,32) + ($gettok($v1,4,32) *60)))
    .notice $nick ----------Ban Information----------
  }
}

Joined: Nov 2008
Posts: 17
V
VictriX Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Nov 2008
Posts: 17
hi there,
the code is working. thank you sir..
but can you add more code ??
when i type !unban <nick>
then type !infoban <nick>
the bot will say
Code:
-Bot- Can't find '<nick>' in database.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Code:
on *:TEXT:!ban *:#channel:{
  if ($$2 ison $chan) && ($$3 isnum) && ($$4) {
    write bans.txt $2 $chan $nick $ctime $3 $4-
  }
}
on *:TEXT:!infoban *:#channel:{
  if ($read(bans.txt,s,$$2)) {
    .notice $nick ----------Ban Information----------
    .notice $nick Username : $2
    .notice $nick From Channel : $gettok($v1,1,32)
    .notice $nick Issued By : $gettok($v1,2,32)
    .notice $nick Reason : $gettok($v1,5-,32)
    .notice $nick Issued : $asctime($gettok($v1,3,32))
    .notice $nick Expires : $asctime($calc($gettok($v1,3,32) + ($gettok($v1,4,32) *60)))
    .notice $nick ----------Ban Information----------
  }
  else { .notice $nick Can't find $$2 in database. }
}
on *:TEXT:!unban *:#channel:{
  if ($read(bans.txt,s,$$2)) { write -ds $+ $2 bans.txt }
}

Joined: Dec 2008
Posts: 24
H
hCK Offline
Ameglian cow
Offline
Ameglian cow
H
Joined: Dec 2008
Posts: 24
sir its already working smile thanks sir
merry xmas
thank you so much

Joined: Jan 2010
Posts: 2
F
Bowl of petunias
Offline
Bowl of petunias
F
Joined: Jan 2010
Posts: 2
hey it must be ...

BAN & KICK ..

if you already ban the nick it must be auto kick ..

and it must be..

!ban <nick> <hours> <reason>

-BOT- <nick> have been banned <hours>

and not Only nick that u ban , the IP too.. laugh nc script..

but u dont have the auto kick..

"AND" .cant unban the nick...the reason is disaMe, i mean it cant remove the last reason.. edit pls...`

Last edited by flux; 22/01/10 03:39 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Did you look at the date of what you replied to? Bringing up really old topics is usually not a good idea.

In any case, the request did not ask to make a script that did the actual kick and ban. It just asked for stats.

If you want something for yourself, then you'll have to be specific. Your post makes little sense.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2010
Posts: 2
F
Bowl of petunias
Offline
Bowl of petunias
F
Joined: Jan 2010
Posts: 2
like this..

!unban sexystar

but the unban is doesnt work, der are no notice that the nick is unban..

<Flux> : !ban sexystar 50 awwwwwwwww

i unban first sexystar then ill Ban again, but the reason is still der and didnt remove ..

the reason is..

- ----------Ban Information----------
- Username : sexystar
- From Channel : #source
- Issued By : LOLI <---FAIl!
- Reason : lolaaaaaaaaaaaaaaaaaaa <---FAIL!
- Issued : Sat Jan 23 14:30:40 2010
- Expires : Fri Jan 22 23:56:51 2010 <---LOL! :c
- ----------Ban Information----------

@the unban is not working,..if i use

!unban <nick> , it must the Bot will say.

-BOT- Flux: set mode [-b SexyStar!*Sexy@xxxxxx4411.xxxB0538xx.xxxxxxCA11.IP]

@please make some like that. laugh ty..

Last edited by flux; 23/01/10 06:54 AM.

Link Copied to Clipboard