Internal commands, are built using Tcl, and called in a Tcl wrapping function (confuzzled yet).
So when a bind is triggered, eggdrop will search it's bind lists, call any internal functions, then call any Tcl scripts, depending on the type of bind.
Just like a Tcl procedure, that is called by an event triggered bind, the same applies to the C functions.
To use Tcl as an example (it's quicker, and you will understand it more).
Code: Select all
bind pub - "!test" test
proc test {nick uh hand chan arg} {
if {![matchattr $hand o|o $chan]} {
puthelp "PRIVMSG $nick :You don't have operator access"
return
}
Triiger code
}
Instead of doing the flga checking in the bind, the script is doing it. It allow a certain flexibility, and is job dependant. In simple scripts, keep to using flags in binds.
Like in my example, the C functions will check the users flags, before allowing him access to the commands.
So even though the user has half-op flags, and the bind allows him to trigger it (simalar to the fact, the bind in the example, allows any1 to trigger it), a check inside the function is stopping him.
The simplest way to locate the files with the functions, is to look in the modules related with the task being done (EG: server, irc, channels and possibly core (IE, eggdrop, not a module)), the files are usualy named so that you can see what there contents are (usualy have Tcl in for code that provides command that can be used in script, cmds for functions that provide bind based commands).