mIRC Home    About    Download    Register    News    Help

Print Thread
#208551 23/01/09 12:34 PM
H
hCK
hCK
H
if i ban in my channel.
Example:

Quote:

<&MrKHmER> !ban [xD]Pakiztah 1 test
* Kdnk sets mode: +b [xD]PAKIZTAH!*oRg@E3E1A29C.CCCCCC4C.D00F7FE1.IP
<&MrKHmER> !infoban [xD]Pakiztah
-Kdnk- ----------Ban Information----------
-Kdnk- Username : [xD]Pakiztah
-Kdnk- From Channel : #kdnk
-Kdnk- Issued By : MrKHmER
-Kdnk- Reason : test
-Kdnk- Issued : Fri Jan 23 20:01:45 2009
-Kdnk- Expires : Fri Jan 23 20:02:45 2009
-Kdnk- ----------Ban Information----------
* Kdnk sets mode: -b [xD]PAKIZTAH!*oRg@E3E1A29C.CCCCCC4C.D00F7FE1.IP

if the ban expires
then i will right !infoban [xD]Pakiztah again the bot will say:
-Kdnk- ----------Ban Information----------
-Kdnk- Username : [xD]Pakiztah
-Kdnk- From Channel : #kdnk
-Kdnk- Issued By : MrKHmER
-Kdnk- Reason : test
-Kdnk- Issued : Fri Jan 23 20:01:45 2009
-Kdnk- Expires : Fri Jan 23 20:02:45 2009
-Kdnk- ----------Ban Information----------

then if i !unban [xD]Pakiztah then i will type again !infoban [xD]Pakiztah
the bot say:

-Kdnk- Can't find [xD]Pakiztah in database.

i want is if the ban expired the !infoban of the nick will gone too.

Example:

<&MrKHmER> !ban [xD]Pakiztah 1 test
* Kdnk sets mode: +b [xD]PAKIZTAH!*oRg@E3E1A29C.CCCCCC4C.D00F7FE1.IP
<&MrKHmER> !infoban [xD]Pakiztah
-Kdnk- ----------Ban Information----------
-Kdnk- Username : [xD]Pakiztah
-Kdnk- From Channel : #kdnk
-Kdnk- Issued By : MrKHmER
-Kdnk- Reason : test
-Kdnk- Issued : Fri Jan 23 20:01:45 2009
-Kdnk- Expires : Fri Jan 23 20:02:45 2009
-Kdnk- ----------Ban Information----------
* Kdnk sets mode: -b [xD]PAKIZTAH!*oRg@E3E1A29C.CCCCCC4C.D00F7FE1.IP
<&MrKHmER> !infoban [xD]Pakiztah
-Kdnk- Can't find [xD]Pakiztah in database.

That's what i want.... Kindly help me Thanks guys. i'll wait for your reply smile

#208552 23/01/09 12:53 PM
Joined: Feb 2007
Posts: 228
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 228
we need to see your !infoban script to help smile

MTec007 #208553 23/01/09 03:23 PM
H
hCK
hCK
H
Code:
on *:TEXT:!infoban*:#Kdnk:{
  if (& isin $nick(#,$nick).pnick) {
    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) * 3600)))
      .notice $nick ----------Ban Information----------
    }
    else { .notice $nick Can't find $$2 in database. }
  }
  else { .notice $nick Sorry, only Kdnk Members have access to that command. }
}

on *:TEXT:!unban*:#Kdnk:{
  if (& isin $nick(#,$nick).pnick) {
    if ($1- == !unban) { .notice $nick Syntax Error: !unban <nick> | halt } {
      if ($read(bans.txt,s,$$2)) { write -ds $+ $2 bans.txt }
      .ban -r $chan $2 
    }
    else { .notice $nick Sorry, only Kdnk Members have access to that command. }
  }
}



Sorry, BTW here's the code smile Help me sir Thanks.


#208554 23/01/09 03:32 PM
Joined: Feb 2007
Posts: 228
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 228
you need to check for bans that have expired and remove them. a timer and an alias work work fine, give me a entry from bans.txt and i will see what i can do.

MTec007 #208555 23/01/09 03:35 PM
H
hCK
hCK
H
You mean this?

Code:
 
on *:TEXT:!ban*:#Kdnk:{
  if (& isin $nick(#,$nick).pnick) {
    if ($1- == !ban) { .notice $nick Syntax Error: !ban <nick> <hours> <reason> | halt } {
      write bans.txt $2 $chan $nick $ctime $3 $4-
      if ($read(mplist.txt,s,$nick) >= $3) {
        write -l $+ $readn mplist.txt $nick $calc($v1 - $3)
        .ban -u $+ $calc($3 * 3600) $chan $2
        .timer 1 $calc($3 * 3600) /ban -r $chan $2
        if ($read(mplist.txt,s,$nick) == 0) {
          mode $chan -ao $nick
          .notice $nick You have 0 mps left. You cannot use the !chanban commands anymore.
        }
      }
      else { .notice $nick Sorry, you do not have enough points. }
    }
    else { .notice $nick Sorry, only Kdnk Members have access to that command. }
  }
}

#208556 23/01/09 03:38 PM
5
5618
5618
5
*poke poke* offline timers wink
And maybe just a simple on UNBAN event?

I'll shut up now. grin

#208557 23/01/09 03:41 PM
H
hCK
hCK
H
yeah. i try it also but it didn't work.

i make
Code:
on @*:UNBAN:#Kdnk:{
  if ($read(bans.txt,s,$$2)) { write -ds $+ $2 bans.txt }
}


is that correct??????

#208562 23/01/09 05:53 PM
Joined: Feb 2007
Posts: 228
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 228
Quote:
The @ prefix

You can limit events to being executed only when you have Ops on a channel by using the @ prefix.


If you are not an Operator this event will not execute, but you do not need to have 'Ops' for this part of the script to work any way. See if removing this makes a difference.

edit: use $bnick instead of $2 here.

Last edited by MTec007; 23/01/09 05:54 PM.
MTec007 #208595 24/01/09 01:34 PM
H
hCK
hCK
H
hmmm sir?

can you be the one to edit it?. i don't know how to.
thanks

#208605 24/01/09 04:13 PM
Joined: Feb 2007
Posts: 228
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 228
on *:UNBAN:#Kdnk:{
if ($read(bans.txt,s,$bnick)) { write -ds $+ $bnick bans.txt }
}


Link Copied to Clipboard