Event: OnBan(from,channel,nick)
Syntax: OnBan(object from,string channel,string nick)
Event arguments
from- the user who set the ban
channel- the channel on which the ban was set
nick- the nickname|mask of the user that was banned
This event trigger when someone sets a ban to a channel.
Note: You can get the host and the user of the person who set the ban by using from.Host
and from.User.
Example:
function OnBan(bannedBy,channel,bannedUser)
{
//Check if the banned user is in your buddy list and if it is send a message to the user who banned your buddy
if(ole.IsBuddy(bannedUser))
{
ole.Msg(bannedBy,bannedUser+" is my friend. Please remove the ban");
}
}