| View previous topic :: View next topic |
| Author |
Message |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Mon Jan 04, 2010 1:20 pm Post subject: Does anyone could help me |
|
|
Does anyone could help me
| Code: | bind pub m|m !akill akill_proc
proc akill_proc { nick uhost hand chan arg } {
set time [lindex [split $arg] 0]
set ip [lindex [split $arg] 1]
set reason [join [lrange [split $arg] 2 end]]
putserv "PRIVMSG OperServ :akill $time $ip $reason"
}
|
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 ) |
|
| Back to top |
|
 |
antsukka Voice
Joined: 03 Jan 2010 Posts: 2
|
Posted: Mon Jan 04, 2010 8:04 pm Post subject: |
|
|
Not sure if I understood correctly but how about string mapping those reasons like this:
| Code: | | set reason [string map {spam "spam is not allowed" flood "flooding causes drowning"} [join [lrange [split $arg] 2 end]]] |
If you want a separate file, just read the mapping pattern from a file into a list. |
|
| Back to top |
|
 |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Tue Jan 05, 2010 1:24 am Post subject: |
|
|
| antsukka wrote: | Not sure if I understood correctly but how about string mapping those reasons like this:
| Code: | | set reason [string map {spam "spam is not allowed" flood "flooding causes drowning"} [join [lrange [split $arg] 2 end]]] |
If you want a separate file, just read the mapping pattern from a file into a list. |
Thank you very much
Excellent work |
|
| Back to top |
|
 |
|