$ibl: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
No edit summary
 
mNo edit summary
 
(One intermediate revision by one other user not shown)
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.
|}
|}


Line 33: Line 33:


== See Also ==
== See Also ==
To set a new ban, take a look at [[Ban|/ban]].
* [[Ban|/ban]] To set a new ban.
 
* [[On_ban|On ban event]] to react on bans.
If you want to react on a ban, see [[On_ban|On ban event]].


Use [[$asctime]] to convert the ctime into a human-readable format.
Use [[$asctime]] to convert the ctime into a human-readable format.
[[Category:Nick and Address Identifiers]]
[[Category:Nick and Address Identifiers]]

Latest revision as of 09:10, 2 July 2007

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

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