This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

HELP !Kline and !akill

Help for those learning Tcl or writing their own scripts.
s
sattam
Voice
Posts: 20
Joined: Sat Jan 02, 2010 8:42 am

HELP !Kline and !akill

Post by sattam »

I try I make the same script and you did not I do not know why

old script Works

Code: Select all

# Kline Command
proc proc_kline {text} {
set time [lindex $text 0]
set ip [lindex $text 1]
set reason [lrange $text 2 end]
putserv "KLINE $time $ip $reason"
putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time" }
bind pub m|m !kline proc_kline
proc proc_kline {nick uhost hand chan arg} {
 set time [lindex [set arg [split $arg]] 0]
 set ip [lindex $arg 1]
 set reason [join [lrange $arg 2 end]]
 putserv "KLINE $time $ip $reason"
 putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time"
}

---

This script, which tried to do

Code: Select all

# akill Command
proc proc_akill {text} {
set time [lindex $text 0]
set ip [lindex $text 1]
set reason [lrange $text 2 end]
putserv "msg OperServ akill $time $ip $reason"
putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time" }
bind pub m|m !akill proc_akill
proc proc_akill {nick uhost hand chan arg} {
 set time [lindex [set arg [split $arg]] 0]
 set ip [lindex $arg 1]
 set reason [join [lrange $arg 2 end]]
 putserv "msg OperServ akill $time $ip $reason"
 putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time"
}
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Try changing

Code: Select all

putserv "msg OperServ akill $time $ip $reason" 
to

Code: Select all

putserv "OPERSERV akill ADD +$time $ip $reason" 

Akill command is different to Gline and Zline Kline they work as /GLINE nickname time reason

akill
/MSG OPERSERV akill add +1d host reason
s
sattam
Voice
Posts: 20
Joined: Sat Jan 02, 2010 8:42 am

Post by sattam »

blake wrote:Try changing

Code: Select all

putserv "msg OperServ akill $time $ip $reason" 
to

Code: Select all

putserv "OPERSERV akill ADD +$time $ip $reason" 

Akill command is different to Gline and Zline Kline they work as /GLINE nickname time reason

akill
/MSG OPERSERV akill add +1d host reason


No change



When I try through the dcc

[03:47:48‹pm›] (=aKline1) [15:50] #So# msg operserv akill time 10 *@t132e2333st.test2.tea spam
[03:47:48‹pm›] (=aKline1) Msg to operserv: akill time 10 *@t132e2333st.test2.tea spam
[03:47:51‹pm›] *** NOTE: aKline1 called you at: aKline1
Added mask '*@t132e2333st.test2.tea' to AKILL list. [Timed] [Reason: spam]


/msg operserv akill time 10 *@t132e2333st.test2.tea spam
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

try putting d after amount of days 10d
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Try this

Code: Select all

bind pub m|m !akill akill_proc
proc akill_proc { nick uhost hand chan arg } {
  set time [lindex [split $arg] 0] 
  set host [lindex [split $arg] 1] 
  set reason [join [lrange [split $arg] 2 end]]  
  putserv "OPERSERV akill add $time $host $reason"
  putlog "-=\002$nick\002=- Akilled this ip: $host ,for $reason ,for time (mins): $time"   
}
do !akill +1d ip reason
s
sattam
Voice
Posts: 20
Joined: Sat Jan 02, 2010 8:42 am

Post by sattam »

blake wrote:Try this

Code: Select all

bind pub m|m !akill akill_proc
proc akill_proc { nick uhost hand chan arg } {
  set time [lindex [split $arg] 0] 
  set host [lindex [split $arg] 1] 
  set reason [join [lrange [split $arg] 2 end]]  
  putserv "OPERSERV akill add $time $host $reason"
  putlog "-=\002$nick\002=- Akilled this ip: $host ,for $reason ,for time (mins): $time"   
}
do !akill +1d ip reason


Does not work

:(

/MSG operserv akill time 10 *@t132e2333st.test2.tea spam


OperServ : AKILL on --> *@t132e2333st.test2.tea by TEST info -> [10s] [ID: 547HT3dBrK83y52e4]. (0.000% of network)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

As you demonstrated in an earlier post, you msg operserv, not using an operserv irc command. As such, replace that line of code with this, which uses the proper command and syntax for sending msg's

Code: Select all

putserv "PRIVMSG OPERSERV :akill $time $ip $reason"
The rest of the code looks ok, though I havn't checked it extensively..
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

The above code I posted works fine on my server unrealircd + Anope

What command are you using because

/MSG operserv akill time 10 *@t132e2333st.test2.tea spam this would not work because its wrong

this is correct syntax !akill +10d *@t132e2333st.test2.tea spam

even your above command wont work sent to operserv by yourself

correct syntax is /msg operserv akill add +10d *@t132e2333st.test2.tea spam this format is used if your aliases are not

with aliases set its /operserv akill add +10d *@t132e2333st.test2.tea spam

Code: Select all

bind pub m|m !akill akill_proc
proc akill_proc { nick uhost hand chan arg } {
  set time [lindex [split $arg] 0]
  set host [lindex [split $arg] 1]
  set reason [join [lrange [split $arg] 2 end]] 
  putserv "PRIVMSG OPERSERV akill add $time $host $reason"
  putlog "-=\002$nick\002=- Akilled this ip: $host ,for $reason ,for time (mins): $time"   
}
use this command in a channel

Code: Select all

!akill +10d *@t132e2333st.test2.tea spam
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Blake,
your privmsg command does not comply with RFC1459. If the last argument of the command contains any whitespace characters , it must be prefixed with a :

As for whether how to use 'operserv', this all depends on how (if at all) it is implemented. You'll se my previous post coresponds well with the example posted by sattam in the beginning of the thread.
NML_375
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

blake wrote:The above code I posted works fine on my server unrealircd + Anope
That's your problem. You've never asked what network or services the OP is using. Your networks/services way of doing this, as nml375 said, is not standard. So of course, what works for you, on your server with your services will _NOT_ work for anyone using networks/services anywhere else.
s
sattam
Voice
Posts: 20
Joined: Sat Jan 02, 2010 8:42 am

Post by sattam »

nml375 wrote:As you demonstrated in an earlier post, you msg operserv, not using an operserv irc command. As such, replace that line of code with this, which uses the proper command and syntax for sending msg's

Code: Select all

putserv "PRIVMSG OPERSERV :akill $time $ip $reason"
The rest of the code looks ok, though I havn't checked it extensively..
Thank you works great
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

How`s that my problem shouldnt they state it when asking

I need this to work with unreal or inspire as for services operserv commands are the same for most ircd`s

as for this

Code: Select all

putserv "PRIVMSG OPERSERV :akill $time $ip $reason"
wow i missed :

Code: Select all

putserv "PRIVMSG OPERSERV akill $time $host $reason"
Aint this here for us to learn and not for the exsperienced to bitch about it even you make mistakes
s
sattam
Voice
Posts: 20
Joined: Sat Jan 02, 2010 8:42 am

Post by sattam »

blake wrote:The above code I posted works fine on my server unrealircd + Anope

What command are you using because

/MSG operserv akill time 10 *@t132e2333st.test2.tea spam this would not work because its wrong

this is correct syntax !akill +10d *@t132e2333st.test2.tea spam

even your above command wont work sent to operserv by yourself

correct syntax is /msg operserv akill add +10d *@t132e2333st.test2.tea spam this format is used if your aliases are not

with aliases set its /operserv akill add +10d *@t132e2333st.test2.tea spam

Code: Select all

bind pub m|m !akill akill_proc
proc akill_proc { nick uhost hand chan arg } {
  set time [lindex [split $arg] 0]
  set host [lindex [split $arg] 1]
  set reason [join [lrange [split $arg] 2 end]] 
  putserv "PRIVMSG OPERSERV akill add $time $host $reason"
  putlog "-=\002$nick\002=- Akilled this ip: $host ,for $reason ,for time (mins): $time"   
}
use this command in a channel

Code: Select all

!akill +10d *@t132e2333st.test2.tea spam


Thank you works great

Is it possible
Start a reason from a file txt

like
!akill time 10 *@t123st.te44st2.tea flood

flood = Banned from the network: Flooding Is Not Allowed In dal.net NetWork. http://chat.dal.net/download )
and

!akill time 10 *@t123st.te44st2.tea (spam)

spam = Banned from the network: Spam Is Not Allowed In dal.net NetWork.
http://chat.dal.net/download )
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

This forum is for anyone and everyone to share their wisdom, and benefit from others'.

Blake,
I merely pointed out an error in your code with a basic explanation of the issue. Personally, I don't call that bitching.. And yes, I do make mistakes every now and then. Sometimes I catch the error myself and make corrections, other times someone else notices the error and bring it to my attention.

If I have offended you in some way, I apologize for that.
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

No not at all its not a problem sattam is trying to get some more help will point him in your direction
Post Reply