Difference between revisions of "$ibl"

From Scriptwiki
Jump to: navigation, search
 
(added link)
Line 14: Line 14:
 
| date      || This returns the date when the user set the ban.
 
| date      || This returns the date when the user set the ban.
 
|-
 
|-
| ctime      || This returns $ctime format for ban date.
+
| ctime      || This returns [[$ctime]] format for ban date.
 
|}
 
|}
  

Revision as of 15:45, 30 November 2005

Returns Nth item in the Internal Ban List (IBL), or if N is 0 returns total number of items in list.

$ibl(#channel,N)


$ibl can have the following properties:

Property Explanation
by This returns the address of the user who set the ban.
date This returns the date when the user set the ban.
ctime This returns $ctime format for ban date.

Example

To show all info about bans you have stored for a specific channel, you could use:

; lets make a new alias called showbans. It will be like /showbans #channel
alias showbans { 
 echo -a Showing bans for $1 ...
 var %i = 1 
 ; lets loop through all items in $ibl for $1 (the channel).
 while (%i <= $ibl($1,0)) {
  ; echo everything we know about the current item (that is $ibl($1,%i))
  echo -a Ban: $ibl($1,%i) By: $ibl($1,%i).by Date: $ibl($1,%i).date Ctime: $ibl($1,%i).ctime
  ; increase looping variable
  inc %i
 }
}

See Also

To set a new ban, take a look at /ban.

If you want to react on a ban, see On ban event.

Use $asctime to convert the ctime into a human-readable format.