Formatting of code : You can (and must) use [ tcl ] an [ /tcl ] tags (without spaces in tags) to format your TCL codes and have syntax coloration x


[Solved] SNOTICE Kline/Gline/Zline/Sshun - paste in Admin Channel
#1
Hello all..

maybe can anyone to help me..

i need this mrc script convert to tcl script.

maybe is this possible to make?!

i have unrealircd 6 and this is from status.

[12:29] -irc.shprehu.net- [info] K-Line added: '*@185.99.2.105' [reason: Proxy/VPN Nuk Lejohet! isx] [by: irc.shprehu.net] [duration: 1h]

example to admin channel show this message when added a akill or kline/zline etc.

<niemand> KLINE+ 185.99.2.105 - reason: Proxy/VPN Nuk Lejohet! uceprotectdnsbl by: irc.shprehu.net duration: 1h


Code:
ON *:SNOTICE:*: {
  tokenize 32 $strip($1-)
  if (*used AKILL on* iswm $1-) { msg #admin 0,5AKILL+ $remove($5,',*@,),(,],[) e shtoi ne AKILL $remove($9,',*@,[,]) }
  if (*used AKILL to remove* iswm $1-) { msg #admin 0,4AKILL- $remove($5,',*@,),(,],[) e fshiu nga AKILL $remove($10,',*@,[,]) }
  if (*K-Line added* iswm $1-) { msg #admin 0,2KLINE+ $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*K-Line removed* iswm $1-) { msg #admin 1,9KLINE- $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*G-Line added* iswm $1-) { msg #admin 0,3GLINE+ $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*G-Line removed* iswm $1-) { msg #admin 0,10GLINE- $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*[info] Z-Line added* iswm $1-) { msg #admin 0,4ZLINE+ $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*[info] Z-Line removed* iswm $1-) { msg #admin 1,11ZLINE- $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*Global Z-Line added* iswm $1-) { msg #admin 0,5GZLINE+ $remove($5,',*@) - $remove($6-,',*@,[,]) }
  if (*Global Z-Line removed* iswm $1-) { msg #admin 0,12GZLINE- $remove($5,',*@) - $remove($6-,',*@,[,]) }
  if (*[info] Shun added* iswm $1-) { msg #admin 0,6SHUN+ $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*[info] Shun removed* iswm $1-) { msg #admin 0,13SHUN- $remove($4,',*@) - $remove($5-,',*@,[,]) }
  if (*Temporary shun added* iswm $1-) { msg #admin 0,7TEMPSHUN+ $remove($7,',*@) - $remove($8-,',*@,[,]) }
  if (*Temporary shun removed* iswm $1-) { msg #admin 0,14TEMPSHUN- $remove($7,',*@) - $remove($8-,',*@,[,]) }
  if (*[rmtkl]*removed* iswm $1-) { msg #admin 1,8RMTKL- u perdor komanda nga $remove($3,',*@) dhe u hoqen gjithsej $remove($5,',*@) }
}
  Reply
#2
hi (bonjour),


tcl
bind raw - NOTICE rawgline:co
proc rawgline:co {from keyword text} {
 
set regexpsanction {\s'([^']+)'\s\[reason:\s(.+)\]\s\[by:\s(.+)\]\s\[(.+):\s(.+)\]}
 
  # Snotice du Gline
  if {[string match -nocase "*G-Line added*" $text]} {
 
     regexp $regexpsanction $text init ipban reason pseudoircop typedate duration
     puthelp "PRIVMSG #admin :GLINE+ $ipban - reason: $reason by: $pseudoircop duration: $duration"
 
  }
 
}

  Reply
#3
its okay but how can i delete from ip this *@

[13:20:10] <@Elysee> GLINE+ *@1.1.1.1 - reason: pcman by: AdmiraL!Loading@Staff.Shprehu.Net duration: permanent


i need to delete all, example [ ] ( ) *@ and ,

maybe u have understean me!
  Reply
#4
I didn't understand , I don't see anywhere [ ] ( ) ,
  Reply
#5
You can also use the log feature from UnrealIRCd: https://www.unrealircd.org/docs/Configuration#Log_block
irc.zeolia.net - Offrez-moi un café
Merci de ne pas demander d'aide en MP
Away
  Reply
#6
(06/11/2022, 14:26)Amand Wrote: I didn't understand , I don't see anywhere [ ] ( ) ,

ah sorry, was my mistake..

no just *@ can u delete from IP? and than its perfect, and this is tcl what i need!

[13:20:10] <@Elysee> GLINE+ *@1.1.1.1 - reason: pcman by: AdmiraL!Loading@Staff.Shprehu.Net duration: permanent
  Reply
#7
(06/11/2022, 14:30)CrazyCat Wrote: You can also use the log feature from UnrealIRCd: https://www.unrealircd.org/docs/Configuration#Log_block

thanks CrazyCat but this tcl what he has make its perfect just when can delete this from IP *@ will be perfect.

becuase i need just Number without *@ u know what i mean..


[13:20:10] <@Elysee> GLINE+ *@1.1.1.1 - reason: pcman by: AdmiraL!Loading@Staff.Shprehu.Net duration: permanent
  Reply
#8
I thought that by giving you a little time, you were going to find the solution, but obviously this is not the case.

you have to modify the regexp. Replace it with :


tcl
set regexpsanction {\s'\*\@([^']+)'\s\[reason:\s(.+)\]\s\[by:\s(.+)\]\s\[(.+):\s(.+)\]}

  Reply
#9
Modify like this (look at regexpsanction ):

tcl
bind raw - NOTICE rawgline:co
proc rawgline:co {from keyword text} {
   set regexpsanction {\s'[^@]+@([^']+)'\s\[reason:\s(.+)\]\s\[by:\s(.+)\]\s\[(.+):\s(.+)\]}
   # Snotice du Gline
   if {[string match -nocase "*G-Line added*" $text]} {
      regexp $regexpsanction $text init ipban reason pseudoircop typedate duration
      puthelp "PRIVMSG #admin :GLINE+ $ipban - reason: $reason by: $pseudoircop duration: $duration"
   }
}

irc.zeolia.net - Offrez-moi un café
Merci de ne pas demander d'aide en MP
Away
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)