Skip to content
General IRCd

Script Help

A TG007 community discussion started by ameer.

Discussion 16 posts
Page 1 of 1
Open
Topic #11341 · 16 published posts · 3,366 views

hello all

i need a code that when some body banned from my room it will store in notpad or somthing tlike this

and i give a commande in the room to script like !last10ban

script will give me the last 10 banded from room and then i give him a command like !unban1 or !unban2

the it will un ban the seconed or first person badnded

sorry i hope u can understand what i need

 

First you must decide how mirc can tell if someone was banned. For that we need to know what network you are on. Are you using mode +b? Because then you could watch the mode event. If you use /access you will have to check the list for added entries.

 

Other than that there is the kick event. It doesn't mean they were banned, but if you want to assume every kick is a ban then you can just use it.

 

After that it's just gathering the information from the event that you need to unban the nicknames.

 

What network are you on? Can you tell me about how you ban? Thanks

hello am on buzzen chat network

and all i need that when some one banded from ther room

it ill auto save the nick and address of the person who bannded in notpad or test decument on script with name ban

and when i want to unban some one all i need to say on room main example

!bans and script will give me the last 10 bans

if i want to unban first !unban1 or !unban2

that all i need

and thank you very much travis

Edited Oct 7, 2008 1:23 PM by ameer

Please reread what i said about it and ask if you dont understand anything. If you do understand please answer the points I brought up. Thank you.

hello

i need it when i kick some one with ban (only with ban ) to save it not only on access list

as i said in a test decument

and my script i think it +b

i hope that what u need to know

thank you

I'm not quite sure what Ameer has in mind, but perhaps this is what he intends to decipher? I don't know. Travis may help him better in achieving his goal.

 

raw 801:*: { hadd -m Bans $3 $addtok($hget(Bans,$3),$4,44) }
on *:PART: { hsave -o Bans Bans.hsh }
on *:CONNECT: { hload Bans Bans.hsh }
on *:DISCONNECT: { hsave -o Bans Bans.hsh }
on 1:INPUT:#: { var %b = $hget(Bans,0).data | while (%b) { 
    if ($1 == !last10ban) { echo 4 $hget(Bans,%b).data | dec %b }
  }
}

Edited Oct 8, 2008 7:26 PM by Fanfare

thank you fanfare

maybe its some thing like that

but i want it to save ban in a text and when i want to unban 1 of last 10 ban

just say !l10b

and it will show me the last 10 bans

then i can chose which one i ill unban

like !unban1

or !unban2

it will save the nick and adders for the ban

thank you

raw 801:*:write Bans.txt $4-
on 1:INPUT:#: {
  if ($1 = !l10b ) {
    echo 4 -a $read(Bans.txt, 1) | echo -a $read(Bans.txt, 2)
    echo 4 -a $read(Bans.txt, 3) | echo -a $read(Bans.txt, 4)
    echo 4 -a $read(Bans.txt, 5) | echo -a $read(Bans.txt, 6)
    echo 4 -a $read(Bans.txt, 7) | echo -a $read(Bans.txt, 8)
    echo 4 -a $read(Bans.txt, 9) | echo -a $read(Bans.txt, 10)
  }
  elseif ($1 = !unban1) { access # delete deny $read(Bans.txt, 1) | echo 2 -a 1st ban has been deleted. }
  elseif ($1 = !unban2) { access # delete deny $read(Bans.txt, 2) | echo 2 -a 2nd ban has been deleted. }
  elseif ($1 = !unban3) { access # delete deny $read(Bans.txt, 3) | echo 2 -a 3rd ban has been deleted. }
  elseif ($1 = !unban4) { access # delete deny $read(Bans.txt, 4) | echo 2 -a 4th ban has been deleted. }
  elseif ($1 = !unban5) { access # delete deny $read(Bans.txt, 5) | echo 2 -a 5th ban has been deleted. }
  elseif ($1 = !unban6) { access # delete deny $read(Bans.txt, 6) | echo 2 -a 6th ban has been deleted. }
  elseif ($1 = !unban7) { access # delete deny $read(Bans.txt, 7) | echo 2 -a 7th ban has been deleted. }
  elseif ($1 = !unban8) { access # delete deny $read(Bans.txt, 8) | echo 2 -a 8th ban has been deleted. }
  elseif ($1 = !unban9) { access # delete deny $read(Bans.txt, 9) | echo 2 -a 9th ban has been deleted. }
  elseif ($1 = !unban10) { access # delete deny $read(Bans.txt, 10) | echo 2 -a 10th ban has been deleted. }
}

 

You can edit the code to read or add more line reads from Bans.txt in the same format shown above.

 

If this works that is great. This will only log people YOU ban. And the input event is to run the command from the same script. It is not a text response. Sorry I'm too busy to really sit down with this. If fanfares code works for you then great! If not, let us know and I will work on something for you.

hello

thank you tarvis

its not write the ban on the bans.text

i made bans.text on script diractory

how i cant say to script !last10bans (it must show me last 10 bans on room main )

and how script can know who is says !unban1 (i mean am on 15:text:!unban1:*: { )

sorry i dont know much on scripting but hope to know

thank you

1. The script I show you only works for you, meaning you are the sole person to trigger it.

2. It should automatically write you a Bans.txt to your mirc directory when you set a ban.

3. That script is written for Buzzen chat.

 

Edited Oct 10, 2008 5:12 PM by Fanfare

If you happen to use SoulFly, SoulFly halts the raw 801 event.

 

Let me know if you use it and I will tell you how to enable the event.

hello

my script is Genesis-v2.1

Please show the command you use to ban people.

 

You only want to log those you ban? Not someone banned by someone else?>

hello

i ban on many ways

like manual from script or auto ban if someone says a bad word

or i use a remate ban like `ban nick

on 15:TEXT:`ban*:#:/access $active add DENY $2- 0 :Added by Battle_BotV4 | /kick # $2- $+ | msg # S \rTahoma;0 $nick $2- Has Been Placed on access denied list!

 

on *:text:`ban*:#: {
  if (!$2) { 
    msg $chan $nick $+ , you need to choose a nickname to ban in this format: !ban <nickname here>
  }
  elseif ($nick isop $chan) { 
    kick $chan $2 Added by Battle_BotV4 | msg # $2 has been placed on access deny list!
    access $active add deny $ial($2).user Banned by Battle Bot V4.
  }
  else { 
    msg $chan Sorry $+ , $nick $+ , you need to at least have a host status to use this command. 
  }
}

Edited Oct 13, 2008 5:23 AM by Fanfare