| View previous topic :: View next topic |
| Author |
Message |
brood Voice
Joined: 01 Sep 2005 Posts: 30
|
Posted: Fri Jan 06, 2006 4:44 pm Post subject: add set channel |
|
|
I want to use a script that gives me and users some commands in the channel. I found lot of them and I think I'm going to use "Op Commands script By xTc^bLiTz"
The only problem is my bot is on 2 channels and I want to have the commands work only on 1 channel.
So my question is, how can it be change so it works only on the channel I want?
| Code: |
# Command Bindings
bind pub n|n !die proc_die
bind pub n|n !restart proc_restart
bind pub m|m !addop proc_addop
bind pub m|m !delop proc_delop
bind pub m|m !deluser proc_deluser
bind pub m|m !adduser proc_adduser
bind pub m|m !jump proc_jump
bind pub m|m !gban proc_gban
bind pub o|o !lc proc_lc
bind pub o|o !uc proc_uc
bind pub o|o !ban proc_ban
bind pub o|o !unban proc_unban
bind pub o|o !whois proc_whois
bind pub o|o !opme proc_opme
bind pub o|o !op proc_op
bind pub o|o !deop proc_deop
bind pub o|o !deopme proc_deopme
bind pub o|o !kick proc_kick
bind pub o|o !voice proc_voice
bind pub o|o !devoice proc_devoice
bind pub o|o !server proc_server
bind pub -|- !commands proc_commands
# Processes
# Process lc
proc proc_lc { nick uhost hand chan args } {
putquick "PRIVMSG $chan :Locking Channel"
putquick "MODE $chan +im"
}
proc proc_uc { nick uhost hand chan args } {
putquick "PRIVMSG $chan :UnLocking Channel"
putquick "MODE $chan -im"
}
# Process die
proc proc_die { nick uhost hand chan text } {
if {$text == ""} {
die $nick
} else { die $text }
}
# Process Restart
proc proc_restart { nick uhost hand chan text } {
putquick "PRIVMSG $chan :Restart Requested By \002$nick\002. Restarting BRB... (hopefully..)"
restart
}
# Op Process
proc proc_op { nick uhost hand chan text } {
putserv "MODE $chan +o $text"
}
# DeOp Process
proc proc_deop { nick uhost hand chan text } {
global botnick
if {$text == $botnick} {
putserv "MSG $chan :umm.. no"
return 0
}
putserv "MODE $chan -o $text"
}
# Process Global Ban
proc proc_gban { nick uhost hand chan text } {
global botnick
# if {@ isin $text} {
# +ban $text Auto-Kicked
# stick ban $text
# return 0
# }
if {[onchan $text]} {
if {$text == $botnick} { return 0 }
set banmask [getchanhost $text $chan]
newchanban $chan $banmask $nick Auto-Kicked 0 sticky
putkick $chan $text Auto-Kicked
putlog "\002$nick\002 Globally Banned \002$text\($banmask\)\002"
} else { putserv "PRIVMSG $chan :$text Not In Channel." }
}
# Proces Jump
proc proc_jump { nick uhost hand chan text } {
jump $text
}
# Process Server
proc proc_server { nick uhost hand chan text } {
global serveraddress
putserv "PRIVMSG $chan :I Am Current Connected To \002$serveraddress\002"
}
# Addop Process
proc proc_addop { nick uhost hand chan text } {
set addopnick [nick2hand $text]
if {[validuser $addopnick]} {
chattr $addopnick +o
putserv "PRIVMSG $chan :$text Has Been Giving Auto-Op Access"
putlog "$nick added $addopnick to Auto-Op"
putquick "MODE $chan +o $text"
putserv "NOTICE $text :You Have Been Givin Auto-Op Access For Channel: \002$chan\002 use \002!commands\002 To List New Channel Commands Available To You"
} else { putserv "PRIVMSG $chan :$text Not Found In User Database, Use !whois <nickname>" }
unset addopnick
}
# Delop Process
proc proc_delop { nick uhost hand chan text } {
set delopnick [nick2hand $text]
if {[validuser $delopnick]} {
chattr $delopnick -o
putserv "PRIVMSG $chan :$text Removed From Auto-Op Access"
putlog "$nick removed $delopnick from Auto-Op"
putquick "MODE $chan -o $text"
} else { putserv "PRIVMSG $chan :$text Not Found In User Database, Use !whois <nickname>" }
unset delopnick
}
# Ban Process
proc proc_ban { nick uhost hand chan text } {
global botnick
if {[onchan $text]} {
if {$text == $botnick} { return 0 }
set banmask [getchanhost $text $chan]
putquick "MODE $chan +b $banmask"
putkick $chan $text :Requested
} else { putserv "PRIVMSG $chan :$text Is Not In The Channel" }
}
# Unban Process
proc proc_unban { nick uhost hand chan text } {
if {[ischanban $text $chan]} {
pushmode $chan -b $text
} else { putserv "PRIVMSG $chan :$text Is Not In The Ban List" }
}
proc proc_whois { nick uhost hand chan text } {
set whoisnick [nick2hand $text]
if {$whoisnick == ""} {
putserv "PRIVMSG $chan :\002$text\002 Not Currently In Channel: \002$chan\002"
} elseif {$whoisnick == "*"} {
putserv "PRIVMSG $chan :\002$text\002 Not Found In User Database, Use \002!adduser $text\002"
} else { putserv "PRIVMSG $chan :I Recognize \002$text\002 As \002$whoisnick\002" }
}
# Process Opme
proc proc_opme { nick uhost hand chan text } {
putquick "MODE $chan +o $nick"
}
# Process Deopme
proc proc_deopme { nick uhost hand chan text } {
putquick "MODE $chan -o $nick"
putquick "MODE $chan +v $nick"
}
# Process AddUser
proc proc_adduser { nick uhost hand chan text } {
set addusernick [nick2hand $text]
if {[validuser $addusernick]} {
putserv "PRIVMSG $chan :\002$text\002 Is Already In User Database As \002$addusernick\002"
} else {
unset addusernick
set addusermask [maskhost $text![getchanhost $text $chan]]
adduser $text $addusermask
set addusernick [nick2hand $text]
putlog "\002$nick\002 Added \002$addusernick\($text\)\002 To User Database"
putserv "PRIVMSG $chan :\002$text\002 Added To User Database As \002$addusernick\002"
unset addusermask
unset addusernick
}
}
# Process DelUser
proc proc_deluser { nick uhost hand chan text } {
set delusernick [nick2hand $text]
if {[validuser $delusernick]} {
deluser $delusernick
putserv "PRIVMSG $chan :\002$text \($delusernick\)\002 Has Been Removed From User Database"
putlog "$nick Removed $delusernick From user Database"
} else { putserv "PRIVMSG $chan :\002$text\002 Not Found In User Database, Use !whois <nickname>" }
}
# Process Kick
proc proc_kick { nick uhost hand chan text } {
if {[onchan $text]} {
putquick "KICK $chan $text :Requested"
} else { putserv "PRIVMSG $chan :\002$text\002 Not In Channel: \002$chan\002" }
}
# Voice Process
proc proc_voice { nick uhost hand chan text } {
if {[onchan $text]} {
set voicenick [nick2hand $text]
if {[validuser $voicenick]} {
chattr $voicenick +v
putquick "MODE $chan +v $text"
putserv "PRIVMSG $chan :\002$text\002 Added To Auto-Voice List"
putlog "$nick Added $voicenick To Auto-Voice List"
} else {
putquick "MODE $chan +v $text"
}
} else { putserv "PRIVMSG $chan :\002$text\002 Not Found In Channel: \002$chan\002"
}
}
# DeVoice Process
proc proc_devoice { nick uhost hand chan text } {
if {[onchan $text]} {
set devoicenick [nick2hand $text]
if {[validuser $devoicenick]} {
chattr $devoicenick -v
putquick "MODE $chan -v $text"
putserv "PRIVMSG $chan :\002$text\002 Removed From Auto-Voice List"
putlog "$nick Removed $devoicenick From Auto-Voice List"
} else {
putquick "MODE $chan -v $text"
}
} else { putserv "PRIVMSG $chan :\002$text\002 Not Found In Channel: \002$chan\002" }
}
# Commands Process
proc proc_commands { nick uhost hand chan text } {
if {[matchattr $hand m|m $chan]} {
putserv "NOTICE $nick :You Are Currently Bot Master, And Have Access To The Following Commands"
proc_listcommands $nick $uhost $hand $chan
return 0
} elseif {[matchattr $hand o|o $chan]} {
putserv "NOTICE $nick :You Are Currently Auto-Op, And Have Access To The Following Commands"
proc_listcommands $nick $uhost $hand $chan
return 0
} else {
putserv "NOTICE $nick :You Are A Basic User, And Have Access To Teh Following Commands"
proc_listcommands $nick $uhost $hand $chan
return 0
}
}
|
thanks |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Jan 06, 2006 7:35 pm Post subject: |
|
|
Give people channel specific flags instead of global ones. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Fri Nov 23, 2007 2:59 pm Post subject: |
|
|
I added two !gban how can I unban that? I couldn't do.. For example:
(I'm founder)
[20:47:20] * ChanServ sets mode: -bb slayish!*@78617340.DC928A45.B7FB3F36.IP grim!*@638A85FE.3FF72A06.661CEC5E.IP
[20:47:37] * Psychoid sets mode: +bb grim!*@638A85FE.3FF72A06.661CEC5E.IP slayish!*@78617340.DC928A45.B7FB3F36.IP
Psychoid is my bot. It is banning always this two IPs. How can I hinder? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Nov 23, 2007 8:48 pm Post subject: |
|
|
| krieg wrote: | I added two !gban how can I unban that? I couldn't do.. For example:
(I'm founder)
[20:47:20] * ChanServ sets mode: -bb slayish!*@78617340.DC928A45.B7FB3F36.IP grim!*@638A85FE.3FF72A06.661CEC5E.IP
[20:47:37] * Psychoid sets mode: +bb grim!*@638A85FE.3FF72A06.661CEC5E.IP slayish!*@78617340.DC928A45.B7FB3F36.IP
Psychoid is my bot. It is banning always this two IPs. How can I hinder? |
Remove them from the bots internal ban list. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Fri Nov 23, 2007 9:03 pm Post subject: |
|
|
| Code: | proc proc_unban { nick uhost hand chan text } {
if {[ischanban $text $chan]} {
pushmode $chan -b $text
} else { putserv "PRIVMSG $chan :$text Is Not In The Ban List" }
} |
replace it with:
| Code: | proc proc_unban { nick uhost hand chan text } {
if {[ischanban $text $chan]} {
killchanban $chan $text
pushmode $chan -b $text
} else { putserv "PRIVMSG $chan :$text Is Not In The Ban List" }
} |
and then use !unban command it will also remove from bots internal list and the channel as well. You dont need to DCC everytime. _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Fri Nov 23, 2007 10:22 pm Post subject: |
|
|
| iamdeath wrote: | | Code: | proc proc_unban { nick uhost hand chan text } {
if {[ischanban $text $chan]} {
pushmode $chan -b $text
} else { putserv "PRIVMSG $chan :$text Is Not In The Ban List" }
} |
replace it with:
| Code: | proc proc_unban { nick uhost hand chan text } {
if {[ischanban $text $chan]} {
killchanban $chan $text
pushmode $chan -b $text
} else { putserv "PRIVMSG $chan :$text Is Not In The Ban List" }
} |
and then use !unban command it will also remove from bots internal list and the channel as well. You dont need to DCC everytime. |
Thank you. |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Thu Nov 29, 2007 12:52 am Post subject: |
|
|
How can I active log system?
/msg $botnick getlog **/**/**
Last edited by krieg on Thu Nov 29, 2007 6:06 pm; edited 3 times in total |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Nov 29, 2007 5:46 pm Post subject: |
|
|
eggdrop logging is configured in the "##### LOG FILES #####" section of eggdrop.conf.
Log files are stored in the "logs" folder. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Thu Nov 29, 2007 6:06 pm Post subject: |
|
|
| and how can I add reason of kick in !kick command? |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Thu Nov 29, 2007 6:11 pm Post subject: |
|
|
for example:
!kick nick reason
!kick Slay You have bad nickname, change it! Try again to join.
*** Slay was kicked by Botnick (You have bad nickname, change it! Try again to join.) |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Nov 29, 2007 7:09 pm Post subject: |
|
|
| krieg wrote: | | and how can I add reason of kick in !kick command? |
Try editing the script? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Fri Nov 30, 2007 12:06 am Post subject: |
|
|
I have not knowledge about editing tcl or scripting much more how can I add reason of kicks.
And in this tcl "!unban" command is not working. Please check for us. Example;
I added someone to banlist,
"!ban nick"
[05:54:41] *** BOTNICK sets mode: +b *!identd@95C46BA0.3059D662.7DFEEA7C.IP
later I try !unban it is not working,
[05:57:11] (X): !unban *!identd@95C46BA0.3059D662.7DFEEA7C.IP
[05:56:58] (X): !unban !*@95C46BA0.3059D662.7DFEEA7C.IP
[05:57:00] (BOTNICK): !*@95C46BA0.3059D662.7DFEEA7C.IP Is Not In The Ban List
[05:57:11] (X): !unban *!identd@95C46BA0.3059D662.7DFEEA7C.IP
[05:57:22] *** X sets mode: -b *!arEna@95C46BA0.3059D662.7DFEEA7C.IP
Note: X=me, BOTNICK=Bot (; |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Nov 30, 2007 12:23 am Post subject: |
|
|
These kinds of op command scripts are very lame, as all they do is duplicate the commands you already have available via the dcc console, and they create great big security risks.
Would be much easier to learn the commands than rely on unsafe and buggy scripts such as this. I wouldn't expect people here to support/fix that script (but ya never know..) |
|
| Back to top |
|
 |
krieg Voice
Joined: 20 Nov 2007 Posts: 13
|
Posted: Fri Nov 30, 2007 1:07 am Post subject: |
|
|
| rosc2112 wrote: | These kinds of op command scripts are very lame, as all they do is duplicate the commands you already have available via the dcc console, and they create great big security risks.
Would be much easier to learn the commands than rely on unsafe and buggy scripts such as this. I wouldn't expect people here to support/fix that script (but ya never know..) |
is there any tcl like this? |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Dec 01, 2007 1:30 am Post subject: |
|
|
| krieg wrote: | for example:
!kick nick reason
!kick Slay You have bad nickname, change it! Try again to join.
*** Slay was kicked by Botnick (You have bad nickname, change it! Try again to join.) |
Find this code:
| Code: | proc proc_kick { nick uhost hand chan text } {
if {[onchan $text]} {
putquick "KICK $chan $text :Requested"
} else { putserv "PRIVMSG $chan :\002$text\002 Not In Channel: \002$chan\002" }
} |
Replace with this:
| Code: | proc proc_kick { nick uhost hand chan text } {
set reason1 [lrange $text 1 end]
if {[onchan $text]} {
putquick "KICK $chan $text :$reason1"
} else { putserv "PRIVMSG $chan :\002$text\002 Not In Channel: \002$chan\002" }
} |
It should kick with a reason now. _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
|