Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10 455 Posts in 5 830 Topics- by 1 216 Members - Latest Member: santini862

20 October 2019, 07:44
Select Language English | Russian ru | German
Main PageIRC Client KVIrc forumKVIrc discussionKVIrc scriptingKick on "Bad Words"
Pages: [1]
Print
Author Topic: Kick on "Bad Words"  (Read 6393 times)
0 Members and 1 Guest are viewing this topic.
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« on: 26 September 2009, 15:05 »

%Array = $array("badword1", "badword2", ... , "badwordX");
foreach (%item,%Array) {
   if ($str.matchnocase(%item,$3))  {
      if ($chan.usermodelevel($0) == 0) {
         kick $target $0;
      }
   }
}


$chan.usermodelevel == 0 means that this user has no rights like voice, halfop, op, admin or owner in the channel.
This "script" should in Event - "OnChannelMessage"
Logged
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« Reply #1 on: 11 September 2010, 00:58 »

KVS Change in KVIrc4, so it has to be $str.match now
Code:
%Array = $array("badword1", "badword2", "badwordX");
foreach (%item,%Array) {
   if ($str.match(%item,$3,1))  {
      if ($chan.usermodelevel($0) == 0) {
         kick $target $0;
      }
   }
}
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic